forked from nunit/nunit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NUnit.proj
565 lines (460 loc) · 27.9 KB
/
NUnit.proj
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
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" InitialTargets="" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- *********************************************************************** -->
<!-- Define Properties -->
<!-- *********************************************************************** -->
<PropertyGroup Label="Common Properties">
<ProjectName>$(MSBuildProjectName)</ProjectName>
<PackageVersion>3.0.0</PackageVersion>
<PackageModifier>-alpha-5b</PackageModifier>
<PackageName>$(ProjectName)-$(PackageVersion)$(PackageModifier)</PackageName>
</PropertyGroup>
<PropertyGroup Label="Platform-specific properties">
<IsWindows Condition=" '$(OS)' == 'Windows_NT' ">true</IsWindows>
<IsWindows Condition=" '$(OS)' != 'Windows_NT' ">false</IsWindows>
<RemoveDir Condition="$(IsWindows)">rmdir /s /q</RemoveDir>
<RemoveDir Condition="!$(IsWindows)">rm -rf</RemoveDir>
<ManagedExeLauncher Condition="!$(IsWindows)">mono</ManagedExeLauncher>
</PropertyGroup>
<PropertyGroup Label="Project Directories">
<ProjectBaseDir>$(MSBuildProjectDirectory)</ProjectBaseDir>
<ProjectBuildDir>$(ProjectBaseDir)\bin</ProjectBuildDir>
<ProjectPackageDir>$(ProjectBaseDir)\package</ProjectPackageDir>
<ProjectSrcDir>$(ProjectBaseDir)\src</ProjectSrcDir>
<FrameworkSrcDir>$(ProjectSrcDir)\NUnitFramework</FrameworkSrcDir>
<EngineSrcDir>$(ProjectSrcDir)\NUnitEngine</EngineSrcDir>
<AddinSrcDir>$(EngineSrcDir)\Addins</AddinSrcDir>
<ConsoleSrcDir>$(ProjectSrcDir)\NUnitConsole</ConsoleSrcDir>
<ProjectToolsDir>$(ProjectBaseDir)\tools</ProjectToolsDir>
<PartCoverDir>$(ProjectToolsDir)\PartCover</PartCoverDir>
<NuspecDirectory>$(ProjectBaseDir)\nuget</NuspecDirectory>
<InstallDir>$(ProjectBaseDir)\install</InstallDir>
</PropertyGroup>
<PropertyGroup Label="Default Build Settings">
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Framework Condition="'$(Framework)' == ''">net-4.5</Framework>
<ConfigSuffix Condition=" '$(Configuration)' == 'Debug' ">-dbg</ConfigSuffix>
</PropertyGroup>
<PropertyGroup Label="Subdirectories">
<ConfigurationBuildDir>$(ProjectBuildDir)\$(Configuration)</ConfigurationBuildDir>
<FrameworkBuildDir>$(ConfigurationBuildDir)\$(Framework)</FrameworkBuildDir>
<EngineBuildDir>$(ConfigurationBuildDir)</EngineBuildDir>
<ConsoleBuildDir>$(ConfigurationBuildDir)</ConsoleBuildDir>
</PropertyGroup>
<PropertyGroup Label="Packaging Directories">
<PackageWorkingDir Condition="'$(PackageWorkingDir)' == ''">$(ProjectPackageDir)\$(PackageName)</PackageWorkingDir>
<PackageBinDir>$(PackageWorkingDir)\bin</PackageBinDir>
<PackageDocDir>$(PackageWorkingDir)\doc</PackageDocDir>
<PackageSrcDir>$(PackageWorkingDir)\src</PackageSrcDir>
<PackageLibDir>$(PackageWorkingDir)\lib</PackageLibDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='net-4.5'">
<ProjectSuffix>4.5</ProjectSuffix>
<Runtime>NET</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='net-4.0'">
<ProjectSuffix>4.0</ProjectSuffix>
<Runtime>NET</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='net-3.5'">
<ProjectSuffix>3.5</ProjectSuffix>
<Runtime>NET</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='net-2.0'">
<ProjectSuffix>2.0</ProjectSuffix>
<Runtime>NET</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='mono-4.5'">
<ProjectSuffix>4.5</ProjectSuffix>
<Runtime>mono</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='mono-4.0'">
<ProjectSuffix>4.0</ProjectSuffix>
<Runtime>mono</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='mono-3.5'">
<ProjectSuffix>3.5</ProjectSuffix>
<Runtime>mono</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='mono-2.0'">
<ProjectSuffix>2.0</ProjectSuffix>
<Runtime>mono</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='netcf-3.5'">
<ProjectSuffix>netcf-3.5</ProjectSuffix>
<Runtime>netcf</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='netcf-2.0'">
<ProjectSuffix>netcf-2.0</ProjectSuffix>
<Runtime>netcf</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='sl-5.0'">
<ProjectSuffix>sl-5.0</ProjectSuffix>
<Runtime>silverlight</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='portable'">
<ProjectSuffix>portable</ProjectSuffix>
<Runtime>portable</Runtime>
</PropertyGroup>
<PropertyGroup Label="Properties for running tests">
<TestOptions Condition="'$(TestOptions)' == ''"></TestOptions>
<ManagedExeLauncher Condition="'$(Runtime)' == 'mono'">mono</ManagedExeLauncher>
<ConsoleRunner>$(ConsoleBuildDir)\nunit-console.exe</ConsoleRunner>
<ResultDir>$(ConfigurationBuildDir)\Results</ResultDir>
<ResultFormat Condition="'$(ResultFormat)' == ''">nunit3</ResultFormat>
<ContinueOnFailure Condition="'$(ContinueOnFailure)' == ''">true</ContinueOnFailure>
</PropertyGroup>
<PropertyGroup Label="Properties for building NuGet packages">
<NugetExecutable>$(ProjectToolsDir)\nuget.exe</NugetExecutable>
<NugetVersion>$(PackageVersion)$(PackageModifier)$(ConfigSuffix)</NugetVersion>
</PropertyGroup>
<!-- *********************************************************************** -->
<!-- Dump Settings Target -->
<!-- *********************************************************************** -->
<Target Name="DumpSettings">
<Message Text=" " />
<Message Text="Platform-specific properties:" />
<Message Text=" Running on '$(OS)' ('IsWindows' = $(IsWindows))" />
<Message Text=" RemoveDir command: '$(RemoveDir)'" />
<Message Text=" " />
<Message Text="Project Directories:" />
<Message Text=" Base: $(ProjectBaseDir)" />
<Message Text=" Build: $(ProjectBuildDir)" />
<Message Text=" Package: $(ProjectPackageDir)" />
<Message Text=" Source: $(ProjectSrcDir)" />
<Message Text=" Framework: $(FrameworkSrcDir)" />
<Message Text=" Engine: $(EngineSrcDir)" />
<Message Text=" Console: $(ConsoleSrcDir)" />
<Message Text=" Tools: $(ProjectToolsDir)" />
<Message Text=" NuSpecs: $(NuspecDirectory)" />
<Message Text=" " />
<Message Text="Build Settings:" />
<Message Text=" Configuration: $(Configuration)" />
<Message Text=" Current Framework: $(Framework)" />
<Message Text=" Runtime: $(Runtime)" />
<Message Text=" Proj. suffix: $(ProjectSuffix)" />
<Message Text=" " />
<Message Text="Test Settings:" />
<Message Text=" Result Directory: $(ResultDir)" />
<Message Text=" Result Format: $(ResultFormat)" />
<Message Text=" ContinueOnFailure: $(ContinueOnFailure)" />
<Message Text=" " />
<Message Text="Output Directories:" />
<Message Text=" Framework: $(FrameworkBuildDir)" />
<Message Text=" Engine: $(EngineBuildDir)" />
<Message Text=" Console: $(ConsoleBuildDir)" />
<Message Text=" " />
<Message Text="Packaging" />
<Message Text=" Name: $(PackageName)" />
<Message Text=" Version: $(PackageVersion)" />
<Message Text=" Work dir: $(PackageWorkingDir)" />
<Message Text=" Bin: $(PackageBinDir)" />
<Message Text=" Source: $(PackageSrcDir)" />
<Message Text=" " />
<Message Text="NuGet" />
<Message Text=" Exe: $(NugetExecutable)" />
<Message Text=" Version: $(NugetVersion)" />
<Message Text=" " />
</Target>
<!-- *********************************************************************** -->
<!-- Clean Targets -->
<!-- *********************************************************************** -->
<Target Name="Clean" DependsOnTargets="CleanFramework;CleanEngine;CleanConsole" />
<Target Name="CleanAll" DependsOnTargets="CleanAllFrameworks;CleanEngine;CleanConsole">
<Exec Command="$(RemoveDir) $(ConfigurationBuildDir)" Condition="Exists('$(ConfigurationBuildDir)')" />
</Target>
<Target Name="CleanFramework" Label="Clean all framework projects for the current runtime and config">
<MSBuild Targets="Clean" Projects="@(FrameworkProjects)" Properties="Configuration=$(Configuration); Platform=AnyCPU" />
<Exec Command="$(RemoveDir) $(FrameworkBuildDir)" Condition="Exists('$(FrameworkBuildDir)')" />
</Target>
<Target Name="CleanAllFrameworks" Label="Clean all framework projects for the current config and all runtimes">
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="CleanFramework" Properties="Framework=%(SupportedFrameworks.Identity)" ContinueOnError="true" />
<Exec Command="$(RemoveDir) $(ConfigurationBuildDir)" Condition="Exists('$(ConfigurationBuildDir)')" />
</Target>
<Target Name="CleanEngine" Label="Clean all engine projects for the current config">
<MSBuild Targets="Clean" Projects="@(EngineProjects)" Properties="Configuration=$(Configuration); Platform=AnyCPU" />
<MSBuild Targets="Clean" Projects="$(EngineSrcDir)\mock-cpp-clr\mock-cpp-clr-x86.vcxproj"
Properties="Configuration=$(Configuration); Platform=Win32"
Condition="'$(Runtime)' == 'NET' And $(IsWindows)" />
<MSBuild Targets="Clean" Projects="$(EngineSrcDir)\mock-cpp-clr\mock-cpp-clr-x64.vcxproj"
Properties="Configuration=$(Configuration); Platform=x64"
Condition="'$(Runtime)' == 'NET' And $(IsWindows)" />
</Target>
<Target Name="CleanConsole" Label="Clean all console runner projects for the current config">
<MSBuild Targets="Clean" Projects="@(ConsoleProjects)" Properties="Configuration=$(Configuration); Platform=AnyCPU" />
</Target>
<!-- *********************************************************************** -->
<!-- Build Targets -->
<!-- *********************************************************************** -->
<Target Name="Build" Label="Build the framework, engine and console for the current config"
DependsOnTargets="BuildFramework;BuildEngine;BuildConsole" />
<Target Name="BuildAll" Label="Build all frameworks, engine and console for the current config"
DependsOnTargets="BuildAllFrameworks;BuildEngine;BuildConsole" />
<Target Name="BuildAllFrameworks" Label="Build the framework for the current config and all runtimes">
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="BuildFramework"
Properties="Framework=%(SupportedFrameworks.Identity)" ContinueOnError="true" />
</Target>
<Target Name="BuildFramework" Label="Build the framework for the current config and runtime">
<MSBuild Targets="Build" Projects="@(NUnitProjects)"
Properties="Configuration=$(Configuration); Platform=AnyCPU" />
</Target>
<Target Name="BuildEngine" Label="Build all engine projects for the current config">
<MSBuild Targets="Build" Projects="@(EngineProjects)"
Properties="Configuration=$(Configuration); Platform=AnyCPU" />
</Target>
<!-- This target is kept separate from the engine because it can't be built on some systems -->
<Target Name="BuildCppTestFiles" Label="Build the C++ assemblies used in some engine tests">
<MSBuild Targets="Build" Projects="$(EngineSrcDir)\mock-cpp-clr\mock-cpp-clr-x86.vcxproj"
Properties="Configuration=$(Configuration); Platform=Win32"
Condition="'$(Runtime)' == 'NET' And $(IsWindows)" />
<MSBuild Targets="Build" Projects="$(EngineSrcDir)\mock-cpp-clr\mock-cpp-clr-x64.vcxproj"
Properties="Configuration=$(Configuration); Platform=x64"
Condition="'$(Runtime)' == 'NET' And $(IsWindows)" />
</Target>
<Target Name="BuildConsole" Label="Build all console projects for the current config">
<MSBuild Targets="Build" Projects="@(ConsoleProjects)"
Properties="Configuration=$(Configuration); Platform=AnyCPU" />
</Target>
<!-- *********************************************************************** -->
<!-- Test Targets -->
<!-- *********************************************************************** -->
<Target Name="TestAll" Label="Run tests for all framework builds, the engine and the console"
DependsOnTargets="TestAllFrameworks;TestEngine;TestAddins;TestV2Driver;TestConsole" />
<Target Name="Test" Label="Run tests for the current framework, engine and console"
DependsOnTargets="TestFramework;TestEngine;TestAddins;TestV2Driver;TestConsole" />
<Target Name="TestAllFrameworks"
Label="Test the framework for the current config and all runtimes">
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="TestFrameworkIfSupported"
Properties="Framework=%(SupportedFrameworks.Identity)"
ContinueOnError="$(ContinueOnFailure)" />
</Target>
<Target Name="TestFrameworkIfSupported"
Label="Run framework tests conditionally, for use by TestAllFrameworks">
<CallTarget Targets="TestFramework"
ContinueOnError="$(ContinueOnFailure)"
Condition="'$(Runtime)' != 'netcf' And '$(Runtime)' != 'silverlight' And '$(Runtime)' != 'portable'" />
</Target>
<Target Name="TestFramework" DependsOnTargets="_CreateResultDir"
Label="Run framework tests for a runtime without checking for errors">
<Message Text="******************************************************************" />
<Message Text="* Testing NUnitFramework $(Framework) - $(Configuration)" />
<Message Text="******************************************************************" />
<Error Condition="'$(Runtime)' == 'netcf' Or '$(Runtime)' == 'silverlight' Or '$(Runtime)' == 'portable'"
Text="The full NUnit framework cannot be tested under $(Runtime)" />
<Exec WorkingDirectory="$(ConsoleBuildDir)"
Command='$(ManagedExeLauncher) $(ConsoleRunner) $(Framework)/nunit.framework.tests.dll "-result:$(ResultDir)/NUnitFrameworkResult-$(Framework).xml;format=$(ResultFormat)" $(TestOptions)'
ContinueOnError="$(ContinueOnFailure)" />
</Target>
<Target Name="TestEngine"
Label ="Run the engine tests"
DependsOnTargets="_CreateResultDir">
<Message Text="******************************************************************" />
<Message Text="* Testing the NUnit Engine - $(Configuration)" />
<Message Text="******************************************************************" />
<Exec WorkingDirectory="$(EngineBuildDir)"
Command='$(ManagedExeLauncher) $(ConsoleRunner) nunit.engine.tests.dll "-result:$(ResultDir)/EngineResult.xml;format=$(ResultFormat)" $(TestOptions)'
ContinueOnError="$(ContinueOnFailure)"/>
</Target>
<Target Name="TestAddins"
Label ="Run the addin tests"
DependsOnTargets="_CreateResultDir">
<Message Text="******************************************************************" />
<Message Text="* Testing the Engine Addins - $(Configuration)" />
<Message Text="******************************************************************" />
<Exec WorkingDirectory="$(EngineBuildDir)"
Command='$(ManagedExeLauncher) $(ConsoleRunner) addins/tests/addin-tests.dll "-result:$(ResultDir)/AddinResult.xml;format=$(ResultFormat)" $(TestOptions)'
ContinueOnError="$(ContinueOnFailure)"/>
</Target>
<Target Name="TestV2Driver"
Label = "Run tests of the NUnit V2 Driver"
DependsOnTargets="_CreateResultDir">
<Message Text="******************************************************************" />
<Message Text="* Testing the NUnit V2 Driver - $(Configuration)" />
<Message Text="******************************************************************" />
<Exec WorkingDirectory="$(EngineBuildDir)"
Command='$(ManagedExeLauncher) $(ConsoleRunner) addins/v2-tests/nunit.v2.driver.tests.dll "-result:$(ResultDir)/V2DriverResult.xml;format=$(ResultFormat)" $(TestOptions)'
ContinueOnError="$(ContinueOnFailure)"/>
</Target>
<Target Name="TestConsole"
Label="Run the console tests"
DependsOnTargets="_CreateResultDir">
<Message Text="******************************************************************" />
<Message Text="* Testing the Console Runner - $(Configuration)" />
<Message Text="******************************************************************" />
<Exec WorkingDirectory="$(ConsoleBuildDir)"
Command='$(ManagedExeLauncher) $(ConsoleRunner) nunit-console.tests.dll "-result:$(ResultDir)/ConsoleResult.xml;format=$(ResultFormat)" $(TestOptions)'
ContinueOnError="$(ContinueOnFailure)" />
</Target>
<Target Name="_CreateResultDir">
<MakeDir Directories="$(ResultDir)" Condition="!Exists(ResultDir)"/>
</Target>
<!-- *********************************************************************** -->
<!-- Coverage Targets -->
<!-- *********************************************************************** -->
<Target Name="TestCoverage">
<CallTarget Targets="_NUnitCoverage" Condition="'$(Runtime)' != 'netcf'"></CallTarget>
</Target>
<Target Name="_NUnitCoverage">
<Error Condition="'$(Runtime)' == 'netcf'" Text="The full NUnit framework cannot be tested under $(Runtime)"></Error>
<Exec WorkingDirectory="$(FrameworkBuildDir)"
Command='$(ManagedExeLauncher) $(PartCoverDir)\PartCover.exe --target "$(ConsoleRunner)" --target-args "$(Framework)/nunit.framework.tests.dll $(TestOptions)" --include [nunit.framework]* --output NUnitTestCoverage.xml'>
</Exec>
</Target>
<!-- *********************************************************************** -->
<!-- Packaging Targets -->
<!-- -->
<!-- WARNING -->
<!-- -->
<!-- Packaging is decoupled from the Build by design. It's up to whoever -->
<!-- creates the package to first make sure that the build is up to date. -->
<!-- *********************************************************************** -->
<Target Name="Package" Label="Packages the source code and binaries already built"
DependsOnTargets="@(AllPackages)">
</Target>
<Target Name="PackageSource" Label="Packages the source code as a zip" DependsOnTargets="_CreateProjectPackageDir">
<Message Text="******************************************************************" />
<Message Text="* Creating the source code package as $(PackageName)-src.zip)" />
<Message Text="******************************************************************" />
<Exec Command='git archive -o "$(ProjectPackageDir)\$(PackageName)-src.zip" HEAD' />
</Target>
<Target Name="PackageBinaries" Label="Packages the binaries as a zip" DependsOnTargets="_CreatePackageImage">
<Message Text="******************************************************************" />
<Message Text="* Creating the binary $(Configuration) package as $(PackageName)$(ConfigSuffix).zip" />
<Message Text="******************************************************************" />
<Exec Command='git init "$(PackageWorkingDir)"' />
<Exec WorkingDirectory='$(PackageWorkingDir)' Command='git add -A' />
<Exec WorkingDirectory='$(PackageWorkingDir)' Command='git config user.name "temp"' />
<Exec WorkingDirectory='$(PackageWorkingDir)' Command='git config user.email "[email protected]"' />
<Exec WorkingDirectory='$(PackageWorkingDir)' Command='git commit -m "Export"' />
<Exec WorkingDirectory='$(PackageWorkingDir)'
Command='git archive -o "$(ProjectPackageDir)\$(PackageName)$(ConfigSuffix).zip" HEAD'></Exec>
</Target>
<Target Name="PackageNuGet" Label="Creates all NuGet packages"
DependsOnTargets="PackageNuGetNUnit;PackageNuGetNUnitLite;PackageNuGetConsole" />
<Target Name="PackageNuGetNUnit" Label="Creates the NUnit Framework NuGet package"
DependsOnTargets="_CreateProjectPackageDir">
<Message Text="******************************************************************" />
<Message Text="* Creating the nunit Nuget $(Configuration) package" />
<Message Text="******************************************************************" />
<Exec WorkingDirectory="$(ProjectBaseDir)"
Command="$(ManagedExeLauncher) "$(NugetExecutable)" pack $(NuspecDirectory)\nunit.nuspec -BasePath "$(ProjectBaseDir)" -OutputDirectory "$(ProjectPackageDir)" -Properties version=$(NugetVersion);builddir=$(ConfigurationBuildDir)" />
</Target>
<Target Name="PackageNuGetNUnitLite" Label="Creates the NUnitlite NuGet package"
DependsOnTargets="_CreateProjectPackageDir">
<Message Text="******************************************************************" />
<Message Text="* Creating the nunitlite Nuget $(Configuration) package" />
<Message Text="******************************************************************" />
<Exec WorkingDirectory="$(ProjectBaseDir)"
Command="$(ManagedExeLauncher) "$(NugetExecutable)" pack $(NuspecDirectory)\nunitlite.nuspec -BasePath "$(ProjectBaseDir)" -OutputDirectory "$(ProjectPackageDir)" -Properties version=$(NugetVersion);builddir=$(ConfigurationBuildDir)" />
</Target>
<Target Name="PackageNuGetConsole" Label="Creates the NUnit.Console NuGet package"
DependsOnTargets="_CreateProjectPackageDir">
<Message Text="******************************************************************" />
<Message Text="* Creating the NUnit.Console Nuget $(Configuration) package" />
<Message Text="******************************************************************" />
<Exec WorkingDirectory="$(ProjectBaseDir)"
Command="$(ManagedExeLauncher) "$(NugetExecutable)" pack $(NuspecDirectory)\nunit.console.nuspec -NoPackageAnalysis -BasePath "$(ProjectBaseDir)" -OutputDirectory "$(ProjectPackageDir)" -Properties version=$(NugetVersion);builddir=$(ConfigurationBuildDir)" />
</Target>
<Target Name="PackageFrameworkMsi" Label="Creates the MSI installer for the NUnit.Framework">
<MSBuild Targets="Build" Projects="$(InstallDir)\framework\nunit-framework.wixproj"
Properties="Configuration=$(Configuration); Platform=x86; OutputPath=$(ProjectPackageDir)" />
</Target>
<Target Name="PackageConsoleMsi" Label="Creates the MSI installer for the NUnit console runner and engine">
<MSBuild Targets="Build" Projects="$(InstallDir)\runners\nunit-runners.wixproj"
Properties="Configuration=$(Configuration); Platform=x86; OutputPath=$(ProjectPackageDir)" />
</Target>
<Target Name="PackageAllMsis" Label="Creates all of the MSI installers for NUnit"
DependsOnTargets="PackageFrameworkMsi;PackageConsoleMsi">
</Target>
<Target Name="_CreatePackageImage" DependsOnTargets="_CleanPackageWorkingDir">
<!-- Copy root txt files to root -->
<Copy DestinationFolder="$(PackageWorkingDir)" SourceFiles="@(RootFiles)" />
<!-- Copy binaries to bin directory -->
<Copy DestinationFiles="@(BinFiles->'$(PackageBinDir)\%(RecursiveDir)%(Filename)%(Extension)')"
SourceFiles="@(BinFiles)"></Copy>
</Target>
<Target Name="_CreateProjectPackageDir">
<MakeDir Directories="$(ProjectPackageDir)" Condition="!Exists(ProjectPackageDir)"/>
</Target>
<Target Name="_CleanPackageWorkingDir">
<Exec Command="$(RemoveDir) $(PackageWorkingDir)" Condition="Exists('$(PackageWorkingDir)')" />
<MakeDir Directories="$(PackageWorkingDir)" />
</Target>
<!-- *********************************************************************** -->
<!-- Lists For Use by Targets -->
<!-- *********************************************************************** -->
<ItemGroup Label ="Targets for Packaging">
<AllPackages Include="PackageSource" />
<AllPackages Include="PackageBinaries" />
<AllPackages Include="PackageNuGet" />
<AllPackages Include="PackageAllMsis" Condition="$(IsWindows)" />
</ItemGroup>
<ItemGroup Label="Files for packaging in root">
<RootFiles Include="LICENSE.txt;NOTICES.txt;CHANGES.txt" />
</ItemGroup>
<ItemGroup Label="Files for packaging in bin directory">
<BinFiles Include="$(ConfigurationBuildDir)\**\*.dll" />
<BinFiles Include="$(ConfigurationBuildDir)\**\*.exe" />
<BinFiles Include="$(ConfigurationBuildDir)\**\*.config" />
<BinFiles Include="$(ConfigurationBuildDir)\**\nunit.framework.xml" />
<BinFiles Include="$(ConfigurationBuildDir)\**\nunit.engine.api.xml" />
<BinFiles Include="$(ConfigurationBuildDir)\EngineTests.nunit" />
<BinFiles Include="$(ConfigurationBuildDir)\ConsoleTests.nunit" />
<BinFiles Include="$(ConfigurationBuildDir)\NUnit2TestResult.xsd" />
<BinFiles Include="$(ConfigurationBuildDir)\TextSummary.xslt" />
<BinFiles Include="$(ConfigurationBuildDir)\nunit.engine.addins" />
<BinFiles Include="$(ConfigurationBuildDir)\nunit.engine.addin.xml" />
<!-- Extra files for Silverlight build -->
<BinFiles Include="$(ConfigurationBuildDir)\**\AppManifest.xaml" />
<BinFiles Include="$(ConfigurationBuildDir)\**\nunit.framework.tests.xap" />
<BinFiles Include="$(ConfigurationBuildDir)\**\nunit.framework.tests_TestPage.html" />
<!-- Include pdp files for Debug -->
<BinFiles Include="$(ConfigurationBuildDir)\**\*.pdb"
Condition="'$(Configuration)' == 'Debug'" />
</ItemGroup>
<ItemGroup Label="Supported Frameworks">
<SupportedFrameworks Include="net-4.5" />
<SupportedFrameworks Include="net-4.0" />
<SupportedFrameworks Include="net-3.5" />
<SupportedFrameworks Include="net-2.0" />
<!--<SupportedFrameworks Condition="$(IsWindows)" Include="netcf-3.5" />-->
<SupportedFrameworks Condition="$(IsWindows)" Include="sl-5.0" />
<SupportedFrameworks Condition="$(IsWindows)" Include="portable" />
</ItemGroup>
<ItemGroup Label="Projects for building the framework">
<NUnitProjects Include="$(FrameworkSrcDir)\framework\nunit.framework-$(ProjectSuffix).csproj"></NUnitProjects>
<NUnitProjects Include="$(FrameworkSrcDir)\nunitlite.runner\nunitlite.runner-$(ProjectSuffix).csproj"
Condition="'$(Runtime)' != 'portable'"></NUnitProjects>
<NUnitProjects Include="$(FrameworkSrcDir)\mock-assembly\mock-nunit-assembly-$(ProjectSuffix).csproj"
Condition="'$(Runtime)' != 'netcf' And '$(Runtime)' != 'silverlight' And '$(Runtime)' != 'portable'"></NUnitProjects>
<NUnitProjects Include="$(FrameworkSrcDir)\testdata\nunit.testdata-$(ProjectSuffix).csproj"></NUnitProjects>
<NUnitProjects Include="$(FrameworkSrcDir)\slow-tests\slow-nunit-tests-$(ProjectSuffix).csproj"
Condition="'$(Runtime)' != 'netcf' And '$(Runtime)' != 'silverlight' And '$(Runtime)' != 'portable'"></NUnitProjects>
<NUnitProjects Include="$(FrameworkSrcDir)\tests\nunit.framework.tests-$(ProjectSuffix).csproj"
Condition="'$(Runtime)' != 'portable'"></NUnitProjects>
</ItemGroup>
<ItemGroup Label="Projects for building the engine">
<!-- Our private version of Mono.Addins -->
<EngineProjects Include="$(EngineSrcDir)\mono-addins\Mono.Addins.csproj" />
<!-- The engine and agent -->
<EngineProjects Include="$(EngineSrcDir)\nunit.engine.api\nunit.engine.api.csproj" />
<EngineProjects Include="$(EngineSrcDir)\nunit.engine\nunit.engine.csproj" />
<EngineProjects Include="$(EngineSrcDir)\nunit-agent\nunit-agent.csproj" />
<EngineProjects Include="$(EngineSrcDir)\nunit-agent\nunit-agent-x86.csproj" />
<!-- Test Assemblies -->
<EngineProjects Include="$(EngineSrcDir)\nunit.engine.tests\nunit.engine.tests.csproj" />
<!-- Addins -->
<EngineProjects Include="$(AddinSrcDir)\nunit-project-loader\nunit-project-loader.csproj" />
<EngineProjects Include="$(AddinSrcDir)\vs-project-loader\vs-project-loader.csproj" />
<EngineProjects Include="$(AddinSrcDir)\nunit-v2-result-writer\nunit-v2-result-writer.csproj" />
<EngineProjects Include="$(AddinSrcDir)\nunit.v2.driver\nunit.v2.driver.csproj" />
<!-- Addin tests -->
<EngineProjects Include="$(AddinSrcDir)\addin-tests\addin-tests.csproj" />
<EngineProjects Include="$(AddinSrcDir)\nunit.v2.driver.tests\nunit.v2.driver.tests.csproj" />
</ItemGroup>
<ItemGroup Label="Projects for building the console runner">
<ConsoleProjects Include="$(ConsoleSrcDir)\nunit-console\nunit-console.csproj" />
<ConsoleProjects Include="$(ConsoleSrcDir)\nunit-console.tests\nunit-console.tests.csproj" />
</ItemGroup>
</Project>