-
Notifications
You must be signed in to change notification settings - Fork 0
/
CIProjectDemo1.msbuild
31 lines (28 loc) · 1.24 KB
/
CIProjectDemo1.msbuild
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
<?xml version="1.0" encoding="UTF-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="RunUnitTests">
<ItemGroup>
<BuildArtifactsDir Include="BuildArtifacts\" />
<SolutionFile Include="CIProjectDemo1.sln" />
<NUnitConsole Include="C:\Program Files (x86)\NUnit 2.6\bin\nunit-console.exe" />
<UnitTestsDLL Include="BuildArtifacts\CIProjectDemo1.UnitTests.dll" />
<TestResultsPath Include="BuildArtifacts\TestResults.xml" />
</ItemGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<BuildPlatform Condition=" '$(BuildPaltform)'== '' ">Any CPU</BuildPlatform>
</PropertyGroup>
<Target Name="RunUnitTests" DependsOnTargets="Compile">
<Exec Command='"@(NUnitConsole)" @(UnitTestsDLL) /xml=@(TestResultsPath)' />
</Target>
<Target Name="Compile" DependsOnTargets="Init">
<MSBuild Projects="@(SolutionFile)" Targets="Rebuild"
Properties="OutDir=%(BuildArtifactsDir.FullPath);Configuration=$(Configuration);Platform=$(BuildPlatform)" />
</Target>
<Target Name="Init" DependsOnTargets="Clean">
<MakeDir Directories="@(BuildArtifactsDir)" />
</Target>
<Target Name="Clean">
<RemoveDir Directories="@(BuildArtifactsDir)" />
</Target>
</Project>