forked from eXpandFramework/eXpand
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Xpand.build
420 lines (403 loc) · 26.8 KB
/
Xpand.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<DeployExtension>false</DeployExtension>
<PowerShellExe Condition=" '$(PowerShellExe)'=='' ">%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellExe>
<DXVersion>17.2</DXVersion>
<DXPath>C:\DevExpress $(DXVersion)</DXPath>
<DBUpdaterPath>$(DXPath)\Components\Tools\eXpressAppFramework\DBUpdater</DBUpdaterPath>
<ProjectConverterPath>$(DXPath)\Components\Tools\Components</ProjectConverterPath>
<ProjectConverterName>ProjectConverter.exe</ProjectConverterName>
<DBUpdaterName>DBUpdater.v$(DXVersion).exe</DBUpdaterName>
<TestExecutorName>TestExecutor.v$(DXVersion).exe</TestExecutorName>
<TestExecutorPath>$(DXPath)\Components\Tools\eXpressAppFramework\EasyTest\$(TestExecutorName)</TestExecutorPath>
<ExtensionTasksPath Condition="'$(ExtensionTasksPath)' == ''">$(MSBuildProjectDirectory)\Support\Build\ExtensionPack\</ExtensionTasksPath>
<ToolsPath>$(MSBuildProjectDirectory)\Support\Tool</ToolsPath>
<NuGetTool>$(ToolsPath)\NuGet.exe</NuGetTool>
<_third_party_assemblies>$(MSBuildProjectDirectory)\Support\_third_party_assemblies</_third_party_assemblies>
<DefineConstants Condition=" '$(DefineConstants)'==''" >DEBUG;TRACE</DefineConstants>
<TwitterTool>$(_third_party_assemblies)\XTwitter.exe</TwitterTool>
<BatchCall>false</BatchCall>
<BuildVSIXCondition>true</BuildVSIXCondition>
<ExecCommand></ExecCommand>
<ExecCommandWorkingDirectory></ExecCommandWorkingDirectory>
<!--
Primary configuration properties (override them via command line if needed
-->
<BuildPath Condition="$(BuildPath)==''">$(MSBuildProjectDirectory)\Build</BuildPath>
<Version Condition="$(Version)==''">0.0.0.0</Version>
<Configuration Condition="$(Configuration)==''">Release</Configuration>
<ArtifactDirectory Condition="$(ArtifactDirectory)==''">$(BuildPath)\Artifact</ArtifactDirectory>
<PackageDirectory Condition="$(PackageDirectory)==''">$(BuildPath)\_Package\$(Version)</PackageDirectory>
<DeploymentFolder Condition="$(DeploymentFolder)==''">$(BuildPath)\_DeploymentFolder\</DeploymentFolder>
<InstallerFolder Condition="$(InstallerFolder)==''">$(BuildPath)\Installer</InstallerFolder>
<XpandDesignExperiencePath>$(MSBuildProjectDirectory)\Support\Xpand.DesignExperience</XpandDesignExperiencePath>
<!--
Derived configuration properties
-->
<ProjectName>Xpand</ProjectName>
<TestPath>$(BuildPath)\Test</TestPath>
<TempPath>$(BuildPath)\Temp</TempPath>
<XpandDLLPath>$(MSBuildProjectDirectory)\Xpand.DLL</XpandDLLPath>
<RecompiledDXSources>$(Configuration)</RecompiledDXSources>
<!-- <RecompiledDXSources>RecompiledDXSources</RecompiledDXSources>-->
<SkipDashboard Condition="'$(RecompiledDXSources)' == 'RecompiledDXSources'">true</SkipDashboard>
<OutputFile>$(MSBuildProjectDirectory)\output.txt</OutputFile>
<SourceExclusions>**\.svn\**\*.*;**\_svn\**\*.*;**\*.user;**\*.suo;**\*.db;**\bin\**\*.*;**\obj\**\*.*;.hg\**\*.*;_hg\**\*.*;.git\**\*.*</SourceExclusions>
<XpandDocsPath>$(MSBuildProjectDirectory)\Xpand.Docs\</XpandDocsPath>
<DocsSiteName>documentation.expandframework.com</DocsSiteName>
<XpandDocsSitePath>C:\inetpub\vhosts\$(DocsSiteName)</XpandDocsSitePath>
</PropertyGroup>
<Import Project="Support\Build\MSBuild.Community.Tasks.targets" />
<Import Project="Support\Build\ExtensionPack\MSBuild.ExtensionPack.tasks" />
<Import Project="Support\Build\Xpand.projects" />
<ItemGroup>
<Tokens Include="SourcePackage">
<ReplacementValue>$(ProjectName)-Source-$(Version).zip</ReplacementValue>
</Tokens>
<Tokens Include="BinaryPackage">
<ReplacementValue>$(ProjectName)-Lib-$(Version).zip</ReplacementValue>
</Tokens>
<Tokens Include="VSIXPackage">
<ReplacementValue>Xpand.VSIX-$(Version).vsix</ReplacementValue>
</Tokens>
<Tokens Include="Version">
<ReplacementValue>$(Version)</ReplacementValue>
</Tokens>
</ItemGroup>
<UsingTask TaskName="MSBuild.ExtensionPack.FileSystem.File" AssemblyFile="Support\build\ExtensionPack\MSBuild.ExtensionPack.dll" />
<UsingTask TaskName="Mash2.MSBuild.Tasks.Twitter" AssemblyFile="Support\build\Mash2\Mash2.MSBuild.Tasks.dll" />
<UsingTask TaskFactory="PowershellTaskFactory" TaskName="IndexSources" AssemblyFile="Support\build\ExtensionPack\MSBuild.ExtensionPack.TaskFactory.PowerShell.dll">
<ParameterGroup>
<Output Output="true" />
</ParameterGroup>
<Task>
<![CDATA[
function Disable-ExecutionPolicy {
($ctx = $executioncontext.gettype().getfield(
"_context","nonpublic,instance").getvalue(
$executioncontext)).gettype().getfield(
"_authorizationManager","nonpublic,instance").setvalue(
$ctx, (new-object System.Management.Automation.AuthorizationManager `
"Microsoft.PowerShell"))
}
Disable-ExecutionPolicy
$log.LogMessage([Microsoft.Build.Framework.MessageImportance]"High", "Source code indexing...")
New-Item -ItemType Directory -Force -Path $(MSBuildProjectDirectory)\Xpand.dll\pdb
$log.LogMessage([Microsoft.Build.Framework.MessageImportance]"High", "Copy symbols to temp...")
Copy-Item -path "$(MSBuildProjectDirectory)\Xpand.dll\*" -include "Xpand.*.pdb" -Destination "$(MSBuildProjectDirectory)\Xpand.dll\pdb"
$var = powershell .\Support\NuSpec\Sourcepack.ps1 -symbolsfolder $(MSBuildProjectDirectory)\Xpand.dll\pdb -userId eXpand -repository eXpand -branch $(DXVersion) -sourcesRoot $(MSBuildProjectDirectory) -verbose -githuburl https://raw.githubusercontent.com -serverIsRaw -dbgToolsPath "$(ToolsPath)\srcsrv"
$log.LogMessage([Microsoft.Build.Framework.MessageImportance]"High", $var)
$log.LogMessage([Microsoft.Build.Framework.MessageImportance]"High", "Copy symbols from temp bakup tp Xpand.Dll...")
Copy-Item -path "$(MSBuildProjectDirectory)\Xpand.dll\pdb\*" -include "Xpand.*.pdb" -Destination "$(MSBuildProjectDirectory)\Xpand.dll" -Verbose -Force
$log.LogMessage([Microsoft.Build.Framework.MessageImportance]"High", "Copy symbols from temp...")
Remove-Item "$(MSBuildProjectDirectory)\Xpand.dll\pdb" -Recurse -Force -Verbose
]]>
</Task>
</UsingTask>
<Target Name="BuildHelperB4Build" Condition="$(SkipBuildHelper)!=true">
<MSBuild Projects=".\Support\BuildHelper\BuildHelper.csproj" Targets="Build" Properties="Configuration=$(Configuration);OutputPath=$(XpandDLLPath);DefineConstants=$(DefineConstants)"/>
<Exec Command="$(XpandDLLPath)\BuildHelper.exe"/>
</Target>
<Target Name="BuildHelperAfterBuild" Condition="$(SkipBuildHelper)!=true">
<MSBuild Projects=".\Support\BuildHelper\BuildHelper.csproj" Targets="Build" Properties="Configuration=$(Configuration);OutputPath=$(XpandDLLPath);DefineConstants=$(DefineConstants)"/>
<Exec Command="$(XpandDLLPath)\BuildHelper.exe --afterbuild"/>
</Target>
<!--
Solution redirects. Every VS project normally knows how to support these targets
-->
<PropertyGroup>
</PropertyGroup>
<Target Name="Copy3rdPartyAssemblies">
<CreateItem Include="$(_third_party_assemblies)\**\*.*">
<Output TaskParameter="Include" ItemName="FilesToCopy"/>
</CreateItem>
<Copy SourceFiles="@(FilesToCopy)" DestinationFolder="$(XpandDLLPath)\%(FilesToCopy.RecursiveDir)" />
</Target>
<Target Name="Build" DependsOnTargets="Clean;Copy3rdPartyAssemblies;BuildHelperB4Build;Restore-Nuget">
<MSBuild Projects="@(CoreProjects)" Targets="Build" Properties="Configuration=$(Configuration);OutputPath=$(XpandDLLPath);RestorePackages=false" />
<MSBuild Projects="@(EasyTestProjects)" Targets="Build" Properties="Configuration=$(Configuration);OutputPath=$(XpandDLLPath);RestorePackages=false" />
<MSBuild Projects="@(HelperProjects)" Targets="Build" Properties="Configuration=$(Configuration);OutputPath=$(XpandDLLPath);DefineConstants=$(DefineConstants);RestorePackages=false" />
<CallTarget Targets="BuildVSIX"/>
<MSBuild Projects="@(ModuleProjects)" Targets="Build" Properties="Configuration=$(RecompiledDXSources);OutputPath=$(XpandDLLPath);RestorePackages=false" />
<CallTarget Targets="BuildNH"/>
<MSBuild Projects="@(EFProjects)" Targets="Build" Properties="Configuration=$(Configuration);OutputPath=$(XpandDLLPath);DefineConstants=$(DefineConstants);RestorePackages=false"/>
<MSBuild Projects="@(DemoSolutions)" Targets="Build" Properties="Configuration=$(Configuration);OutputPath=$(XpandDLLPath);DefineConstants=CodeFirst;RestorePackages=false"/>
<MSBuild Projects="@(DemoTesterProjects)" Targets="Build" Properties="Configuration=$(Configuration);OutputPath=$(XpandDLLPath);RestorePackages=false"/>
<MSBuild Projects="Support\XpandTestExecutor\XpandTestExecutor.sln" Targets="Build" Properties="Configuration=Debug;OutputPath=$(XpandDLLPath);RestorePackages=false"/>
<MSBuild Projects="Support\XpandTestExecutor\RDClient\RDClient.csproj" Targets="Build" Properties="Configuration=Debug;OutputPath=$(XpandDLLPath);RestorePackages=false"/>
<ItemGroup>
<DxAssemblies Include="$(XpandDLLPath)\**\DevExpress*.*" ></DxAssemblies>
</ItemGroup>
<Delete Files="@(DxAssemblies)" Condition="$(LeaveDXAssemblies)!=true"></Delete>
<CallTarget Targets="BuildHelperAfterBuild"/>
</Target>
<Target Name="BuildNH">
<MSBuild Projects="@(NHProjects)" Targets="Build" Properties="Configuration=$(Configuration);OutputPath=$(XpandDLLPath)" />
</Target>
<Target Name="Clean" >
<MSBuild Projects="@(CoreProjects)" Targets="Clean" Properties="Configuration=$(Configuration)" />
<MSBuild Projects="@(EasyTestProjects)" Targets="Clean" Properties="Configuration=$(Configuration)" />
<MSBuild Projects="@(HelperProjects)" Targets="Clean" Properties="Configuration=$(Configuration)" />
<MSBuild Projects="$(VSAddons)" Targets="Clean" Properties="Configuration=$(Configuration)" ContinueOnError="$(BatchCall)" />
<MSBuild Projects="$(ModuleProjects)" Targets="Clean" Properties="Configuration=$(RecompiledDXSources)" />
<MSBuild Projects="@(NHProjects)" Targets="Clean" Properties="Configuration=$(Configuration)" />
<MSBuild Projects="@(EFProjects)" Targets="Clean" Properties="Configuration=$(Configuration)" />
<MSBuild Projects="@(DemoSolutions)" Targets="Clean" Properties="Configuration=$(Configuration);DefineConstants=CodeFirst;" />
<MSBuild Projects="@(DemoTesterProjects)" Targets="Clean" Properties="Configuration=$(Configuration)" />
<ItemGroup>
<EasyTestVideoFolders Include="$([System.IO.Directory]::GetDirectories(".","ScreenCapture", SearchOption.AllDirectories))"/>
<BinFolders Include="$([System.IO.Directory]::GetDirectories(".","bin", SearchOption.AllDirectories))"/>
<ObjFolders Include="$([System.IO.Directory]::GetDirectories(".","obj", SearchOption.AllDirectories))"/>
<ModelAdaptorDllFolders Include="$([System.IO.Directory]::GetDirectories(".","ModelAdaptorDll", SearchOption.AllDirectories))"/>
</ItemGroup>
<RemoveDir Directories="@(EasyTestVideoFolders)"/>
<RemoveDir Directories="@(BinFolders)"/>
<RemoveDir Directories="@(ObjFolders)"/>
<RemoveDir Directories="@(ModelAdaptorDllFolders)"/>
<RemoveDir Directories="$(XpandDLLPath)"/>
<RemoveDir Directories="$(_third_party_assemblies)\Packages\" />
</Target>
<Target Name="Copy" DependsOnTargets="Build">
<MakeDir Directories="$(BuildPath);$(TempPath)" />
<CreateItem Include="$(XpandDLLPath)\*.*;" Exclude="$(XpandDLLPath)\*.locked;$(XpandDLLPath)\DevExpress*.*">
<Output ItemName="files" TaskParameter="Include" />
</CreateItem>
<Copy SourceFiles="@(files)" DestinationFolder="$(TempPath)" />
<CreateItem Include="Xpand.Key\Xpand.snk;">
<!--Exclude="$(XpandDLLPath)\*.locked" -->
<Output ItemName="keyFiles" TaskParameter="Include" />
</CreateItem>
<Copy SourceFiles="@(keyFiles)" DestinationFolder="$(BuildPath)\Xpand.Key" />
</Target>
<Target Name="PublishXpandDocsSite" DependsOnTargets="RunEasyTestsForDocsSite;UpdateXpandDocsSiteFiles;XpandDocsSiteDBUpdater"/>
<Target Name="StartXpandDocsSite">
<Exec Command="appcmd start site /site.name:$(DocsSiteName)" WorkingDirectory="$(windir)\system32\inetsrv"></Exec>
</Target>
<Target Name="KillXpandDocsSite">
<MSBuild.ExtensionPack.Computer.Process TaskAction="Get" IncludeUserInfo="true">
<Output ItemName="ProcessList" TaskParameter="Processes"/>
</MSBuild.ExtensionPack.Computer.Process>
<MSBuild.ExtensionPack.Computer.Process TaskAction="Terminate" ProcessId="%(ProcessList.ProcessId)" Condition="'%(ProcessList.User)' == '$(DocsSiteName)'"/>
<Exec Command="appcmd stop site /site.name:$(DocsSiteName)" WorkingDirectory="$(windir)\system32\inetsrv"></Exec>
</Target>
<Target Name="UpdateXpandDocsSiteFiles">
<Exec Command='$(ProjectConverterName) /sc "$(XpandDocsSitePath)"' WorkingDirectory="$(ProjectConverterPath)"></Exec>
<MSBuild Projects="$(XpandDocsPath)\Xpand.Docs.sln" Targets="Build" Properties="Configuration=$(Configuration)" />
<CallTarget Targets="KillXpandDocsSite" />
<ItemGroup>
<PackagedFiles Include="$(XpandDocsPath)\Xpand.Docs.Web\**\*.*;"
Exclude="$(XpandDocsPath)\**\*.csproj;$(XpandDocsPath)\**\*.pdb;$(XpandDocsPath)\**\*.resx;$(XpandDocsPath)\**\*.log;$(XpandDocsPath)\**\*.bak;$(XpandDocsPath)\Xpand.Docs.Web\obj\**\*.*;$(XpandDocsPath)\Xpand.Docs.Web\Properties\*.*;$(XpandDocsPath)\Xpand.Docs.Web\**\*.cs;$(XpandDocsPath)\Xpand.Docs.Web\*.config"/>
</ItemGroup>
<Copy SourceFiles="@(PackagedFiles)" DestinationFiles="@(PackagedFiles->'$(XpandDocsSitePath)\%(RecursiveDir)%(Filename)%(Extension)')"/>
<CallTarget Targets="StartXpandDocsSite" />
</Target>
<Target Name="ConfigXpandDocsSiteDBUpdater">
<PropertyGroup>
<DBUpdaterFolder>$(XpandDocsSitePath)\bin</DBUpdaterFolder>
<DBUpdaterConfig>..\web.config</DBUpdaterConfig>
<DBUpdaterDll>Xpand.docs.web.dll</DBUpdaterDll>
</PropertyGroup>
</Target>
<Target Name="XpandDocsSiteDBUpdater" DependsOnTargets="ConfigXpandDocsSiteDBUpdater;DBUpdate">
</Target>
<Target Name="RunEasyTestsForDocsSite" DependsOnTargets="ConfigEasyTestParamsForDocsSite;RunEasyTests">
</Target>
<Target Name="ConfigEasyTestParamsForDocsSite">
<PropertyGroup>
<EasyTestFilter>Xpand.Docs\</EasyTestFilter>
<FCWebDbUpdater>No</FCWebDbUpdater>
</PropertyGroup>
<ItemGroup>
<EasyTests Remove="@(EasyTests)"></EasyTests>
<EasyTestLogs Remove="@(EasyTestLogs)"></EasyTestLogs>
<EasyProjects Remove="@(EasyProjects)"></EasyProjects>
<EasyTests Include="$(MSBuildProjectDirectory)\$(EasyTestFilter)**\*.ets"/>
<EasyProjects Include="$(MSBuildProjectDirectory)\$(EasyTestFilter)\Xpand.Docs.sln"></EasyProjects>
</ItemGroup>
</Target>
<Target Name="w">
<Message Text="@(EasyTests -> '%(Filename)','%0a')"></Message>
</Target>
<Target Name="PrintEasyTestLogs" >
<ItemGroup>
<FailedLogs Include="$(MSBuildProjectDirectory)\$(EasyTestFilter)**\TestsLog.xml"/>
</ItemGroup>
<MSBuild.ExtensionPack.Xml.XmlFile
TaskAction="ReadElements" File="%(FailedLogs.FullPath)" Condition="'@(FailedLogs->Count())'!='0'"
XPath="/Tests/Test[@Result='Warning' or @Result='Failed']" ReadChildrenToMetadata="true">
<Output TaskParameter="Elements" ItemName="Test"/>
</MSBuild.ExtensionPack.Xml.XmlFile>
<Error Text="@(Test -> '%(ApplicationName) - %(Name)%0a%(Error)%0a','%0a')" Condition="'@(Test->Count())'!='0'"></Error>
</Target>
<Target Name="ConfigFCWebDbUpdater">
<PropertyGroup>
<DBUpdaterFolder>$(MSBuildProjectDirectory)\Demos\FeatureCenter\FeatureCenter.Web\bin</DBUpdaterFolder>
<DBUpdaterConfig>..\web.config</DBUpdaterConfig>
<DBUpdaterDll>FeatureCenter.Web.dll</DBUpdaterDll>
</PropertyGroup>
</Target>
<Target Name="FCWebDbUpdater">
<ItemGroup>
<DbToDrop Include="Northwind;XpandFeatureCenterWeb;XpandFeatureCenterEasyTest;XpandFeatureCenterExceptionHandling;XpandFeatureCenterMultipleDataStore;XpandFeatureCenterWorldCreator;XpandFeatureCenter"></DbToDrop>
</ItemGroup>
<Exec Command='sqlcmd -E -S "(localdb)\mssqllocaldb" -Q "ALTER DATABASE %(DbToDrop.Identity) SET SINGLE_USER WITH ROLLBACK IMMEDIATE"' ContinueOnError="false"/>
<Exec Command='sqlcmd -E -S "(localdb)\mssqllocaldb" -Q "DROP DATABASE %(DbToDrop.Identity)"' ContinueOnError="false"/>
<CallTarget Targets="ConfigFCWebDbUpdater;DBUpdate"></CallTarget>
</Target>
<Target Name="DBUpdate">
<Copy SourceFiles="$(DBUpdaterPath)\$(DBUpdaterName)" DestinationFolder="$(DBUpdaterFolder)"/>
<Exec Command="$(DBUpdaterName) -silent $(DBUpdaterConfig) $(DBUpdaterDll) >$(OutputFile)" WorkingDirectory="$(DBUpdaterFolder)" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
</Exec>
<ReadLinesFromFile File="$(OutputFile)">
<Output TaskParameter="Lines" ItemName="ExitCodeLines"/>
</ReadLinesFromFile>
<Error Text="@(ExitCodeLines->'%(Identity)', '%0a%0d')" Condition="'$(ErrorCode)' == '1'" />
<Message Text="@(ExitCodeLines->'%(Identity)', '%0a%0d')" Condition="'$(ErrorCode)' != '1'" />
<Delete Files="$(OutputFile)"></Delete>
</Target>
<Target Name="tmpStorage">
<Message Text="%(EasyTestLogs.Identity)"></Message>
</Target>
<PropertyGroup>
<EasyTestFilter>Demos\</EasyTestFilter>
</PropertyGroup>
<ItemGroup>
<EasyTestLogs Include="$(MSBuildProjectDirectory)\**\TestsLog.xml"/>
<EasyProjects Include="@(DemoSolutions)"/>
<EasyProjects Include="@(DemoTesterProjects)"/>
<EasyTestReqs Include="$(XpandDLLPath)\Xpand.utils.dll;$(XpandDLLPath)\Xpand.ExpressApp.EasyTest.WinAdapter.dll;$(XpandDLLPath)\Xpand.ExpressApp.EasyTest.WebAdapter.dll;$(XpandDLLPath)\Xpand.EasyTest.dll;$(XpandDLLPath)\Fasterflect.dll;$(XpandDLLPath)\Aforge*.dll;"/>
<EasyTestReqs Include="$(XpandDLLPath)\Xpand.ExpressApp.EasyTest.WinAdapter.pdb;$(XpandDLLPath)\Xpand.ExpressApp.EasyTest.WebAdapter.pdb;$(XpandDLLPath)\Xpand.EasyTest.pdb;$(XpandDLLPath)\Xpand.utils.pdb"/>
<EasyTestReqs Include="$(XpandDLLPath)\psexec.exe;$(XpandDLLPath)\CommandLine.dll;$(XpandDLLPath)\executorwrapper.exe;$(XpandDLLPath)\RDClient.exe;$(TestExecutorPath);$(TestExecutorPath).config;$(_third_party_assemblies)\AxInterop.MSTSCLib.dll;$(_third_party_assemblies)\Interop.MSTSCLib.dll"/>
<AutoTests Include="$(MSBuildProjectDirectory)\$(EasyTestFilter)**\AutoTest*.ets"/>
<EasyTests Include="$(MSBuildProjectDirectory)\$(EasyTestFilter)**\*.ets"/>
</ItemGroup>
<Target Name="BuildEasyTest" Condition="('@(EasyTests->Count())'!='1')">
<!---->
<MSBuild Projects="@(EasyProjects)" Targets="Build" Properties="Configuration=EasyTest" />
<CallTarget Targets="FCWebDbUpdater" Condition="'$(FCWebDbUpdater)'==''" />
</Target>
<Target Name="CopyEasyTestReqs">
<CreateItem Include="@(EasyTestReqs)" AdditionalMetadata="CopiedToDir=%(EasyTests.RelativeDir);" >
<Output ItemName="EasyTestReqsToDelete" TaskParameter="Include"/>
</CreateItem>
<Copy SourceFiles="@(EasytestReqs)" DestinationFolder="%(EasyTests.RelativeDir)"/>
</Target>
<Target Name="RunEasyTests">
<CallTarget Targets='BuildEasyTest' ></CallTarget>
<Delete Files="@(EasyTestLogs)"/>
<CallTarget Targets="CopyEasyTestReqs"/>
<WriteLinesToFile File="$(XpandDLLPath)\easytests.txt" Lines="@(EasyTests)" Overwrite="true"></WriteLinesToFile>
<Exec Command="$(XpandDLLPath)\XpandTestExecutor.Win.exe easytests.txt" WorkingDirectory="$(XpandDLLPath)" />
<Delete Files="%(EasyTestReqsToDelete.CopiedToDir)%(EasyTestReqsToDelete.Filename)%(EasyTestReqsToDelete.Extension)"/>
<CallTarget Targets="CreateEasyTestVideos"></CallTarget>
<CallTarget Targets='PrintEasyTestLogs' ></CallTarget>
</Target>
<Target Name="CreateEasyTestVideos">
<ItemGroup>
<EasyTestVideoImages Include="**/ScreenCapture/*.png"/>
<EasyTestVideoFolders Include="$([System.IO.Directory]::GetDirectories(".","ScreenCapture", SearchOption.AllDirectories))"/>
<EasyTestVideoFoldersList Include="@(EasyTestVideoFolders->'.%(Identity)')"></EasyTestVideoFoldersList>
</ItemGroup>
<PropertyGroup>
<EasyTestVideoFolders>@(EasyTestVideoFoldersList)</EasyTestVideoFolders>
</PropertyGroup>
<ItemGroup>
<VideoBuilderFiles Include="$(XpandDLLPath)\Aforge*.dll;$(_third_party_assemblies)\Aforge*.dll;$(_third_party_assemblies)\FFMPEG\*.*"></VideoBuilderFiles>
</ItemGroup>
<Copy SourceFiles="@(VideoBuilderFiles)" DestinationFolder="$(XpandDLLPath)" SkipUnchangedFiles="true"></Copy>
<MSBuild Projects="$(MSBuildProjectFile)" Targets="ExecuteCommand" Properties="ExecCommand=VideoBuilder.exe $(EasyTestVideoFolders);ExecCommandWorkingDirectory=$(XpandDLLPath)" ContinueOnError="True" />
<Delete Files="@(EasyTestVideoImages)"></Delete>
</Target>
<Target Name="Config">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="ExecuteCommand" Properties="ExecCommand=VideoBuilder.exe $(EasyTestVideoFolders);ExecCommandWorkingDirectory=$(XpandDLLPath)" />
<Message Text="This sub-solution does not need configuration" />
</Target>
<Target Name="Restore-Nuget">
<Exec Command="$(PowerShellExe) -NonInteractive -executionpolicy Unrestricted -command "& { &'.\Support\Build\Restore-Nuget.ps1' } "" ConsoleToMSBuild="true" />
</Target>
<Target Name="Build-Demos">
<PropertyGroup>
<ScriptLocation Condition=" '$(ScriptLocation)'=='' ">.\Support\Build\Build-Demos.ps1</ScriptLocation>
<Com>$(PowerShellExe) -NonInteractive -executionpolicy Unrestricted -command "& { &'$(ScriptLocation)' '$(MSBuildBinPath)\msbuild.exe' } "
</Com>
</PropertyGroup>
<Message Text="$(com)"/>
<Exec Command="$(Com)" ConsoleToMSBuild="true" />
</Target>
<!--For Continuous integration and automated releases-->
<Target Name="Release" DependsOnTargets="Clean;_Version;Build;Copy" >
<MakeDir Directories="$(ArtifactDirectory)" />
<IndexSources/>
</Target>
<Target Name="Installer">
<Exec Command="$(PowerShellExe) -NonInteractive -executionpolicy Unrestricted -command "& { &'.\Support\Build\Installer.ps1' '$(MSBuildProjectDirectory)' '$(Version)' } "" ConsoleToMSBuild="true" />
<!--<Exec Command="$(XpandDLLPath)\DistribNugetAssemblies.exe" WorkingDirectory="$(XpandDLLPath)"></Exec>-->
</Target>
<Target Name="BuildVSIX" Condition="'$(BuildVSIXCondition)'=='true'">
<MSBuild Projects="@(VSAddons)" Targets="Build" Properties="DeployExtension=$(DeployExtension);Configuration=$(Configuration);OutputPath=$(XpandDLLPath)\Plugins;DefineConstants=$(DefineConstants);RestorePackages=false" ContinueOnError="$(BatchCall)"/>
<Exec Command="$(PowerShellExe) -NonInteractive -executionpolicy Unrestricted -command "& { &'.\Support\Build\BuildVSIX.ps1' '$(MSBuildProjectDirectory)' '$(MSBuildBinPath)\msbuild.exe' '$(Version)' } "" ConsoleToMSBuild="true" />
</Target>
<Target Name="DeployUpdate">
<MakeDir Directories="$(DeploymentFolder);" />
<CreateItem Include="$(PackageDirectory)\*.*;">
<Output ItemName="deploymentFiles" TaskParameter="Include" />
</CreateItem>
<Copy SourceFiles="@(deploymentFiles)" DestinationFolder="$(DeploymentFolder)\%(deploymentFiles.SubFolder)%(deploymentFiles.RecursiveDir)" />
<Time Format="yyyy-MM-dd HH:mm">
<Output TaskParameter="FormattedTime" PropertyName="BuildTime" />
</Time>
<!-- Hack because buildtime is dynamically
http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/2c910802-e8c9-4bf1-bdb1-ef7835011eeb
-->
<Time Format="yyyy-MM-dd HH:mm">
<Output TaskParameter="FormattedTime" PropertyName="BuildTime" />
</Time>
<CreateItem Include="BuildTime" AdditionalMetadata="ReplacementValue=$(BuildTime)">
<Output TaskParameter="Include" ItemName="BuildTimeToken" />
</CreateItem>
<CreateItem Include="@(Tokens);@(BuildTimeToken);">
<Output TaskParameter="Include" ItemName="AllTokens" />
</CreateItem>
<!--Index-->
<Copy SourceFiles="Support\Template\index.template" DestinationFolder="$(TempPath)" />
<TemplateFile Template="$(TempPath)\index.template" OutputFile="index.out" Tokens="@(AllTokens)" />
<Copy SourceFiles="$(TempPath)\index.out" DestinationFiles="$(DeploymentFolder)\index.htm" />
</Target>
<Target Name="Twitter">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="ExecuteCommand" Properties="ExecCommand=$(TwitterTool) "$(TwitterConsumerKey)" "$(TwitterConsumerSecret)" "$(TwitterAccessToken)" "$(TwitterAccessTokenSecret)" "new@expandframework v$(Version): http://goo.gl/g9wRy @DevExpress_XAF #dotnet #opensource #software #LOB #business #application #framework"" />
</Target>
<Target Name="_Version">
<Time Format="yyyy-MM-dd HH:mm">
<Output TaskParameter="FormattedTime" PropertyName="BuildTime" />
</Time>
</Target>
<Target Name="ExecuteCommand">
<Exec ContinueOnError="True" Command="$(ExecCommand)" ConsoleToMSBuild="true" WorkingDirectory="$(ExecCommandWorkingDirectory)" >
<!--<Output TaskParameter="ConsoleToMSBuild" PropertyName="OutputOfExec" />-->
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
</Exec>
<Error Text="$(OutputOfExec)" Condition="'$(ErrorCode)' > '0'" />
</Target>
<ItemGroup>
<NuspecFile Include="Support\Nuspec\*.nuspec" Exclude="Support\Nuspec\XtraDashboardWin.nuspec;Support\Nuspec\XtraDashboardWeb.nuspec;Support\Nuspec\DX-Nuspec\*.nuspec" Condition="$(SkipDashboard)=='true'"/>
<NuspecFile Include="Support\Nuspec\*.nuspec" Exclude="Support\Nuspec\DX-Nuspec\*.nuspec" Condition="$(SkipDashboard)!='true'"/>
</ItemGroup>
<Target Name="NuGetPackage" Inputs="@(NuspecFile)" Outputs="NotUsedOutput">
<CallTarget Targets="BuildHelperAfterBuild"/>
<CreateItem Include="$(XpandDLLPath)\*.pdb;$(XpandDLLPath)\*.dll">
<Output ItemName="files" TaskParameter="Include" />
</CreateItem>
<Copy SourceFiles="@(files)" DestinationFolder="$(TempPath)" />
<MakeDir Directories="$(BuildPath)\NuGet" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="ExecuteCommand" Properties="ExecCommand=$(NuGetTool) pack %(NuspecFile.Identity) -OutputDirectory $(BuildPath)\NuGet -Version $(Version) -BasePath $(MSBuildProjectDirectory)" />
<CreateItem Include="Build\NuGet\*.nupkg" >
<Output TaskParameter="Include" ItemName="NuGetFile"/>
</CreateItem>
<Message Text="@(NuGetFile)"></Message>
</Target>
<Target Name="NuGet" Inputs="@(NuGetFile)" Outputs="NotUsedOutput" DependsOnTargets="NuGetPackage">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="ExecuteCommand" Properties="ExecCommand=$(NuGetTool) push %(NuGetFile.Identity) $(NuGetApiKey) -source https://api.nuget.org/v3/index.json" />
</Target>
</Project>