-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.proj
78 lines (69 loc) · 3.96 KB
/
build.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
<?xml version="1.0" encoding="utf-8"?>
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0"
DefaultTargets="Tests">
<PropertyGroup>
<Jwt>System.IdentityModel.Tokens.Jwt</Jwt>
<Ext>Microsoft.IdentityModel.Protocol.Extensions</Ext>
</PropertyGroup>
<ItemGroup>
<SystemIdentityModelTokensJwt Include=".\src\System.IdentityModel.Tokens.Jwt\System.IdentityModel.Tokens.Jwt.csproj" />
<SystemIdentityModelTokensJwtTests Include=".\tests\System.IdentityModel.Tokens.Jwt.Tests\System.IdentityModel.Tokens.Jwt.Tests.csproj" />
<MicrosoftIdentityModelProtocolExtensions Include=".\src\Microsoft.IdentityModel.Protocol.Extensions\Microsoft.IdentityModel.Protocol.Extensions.csproj" />
<MicrosoftIdentityModelProtocolExtensionsTests Include=".\tests\Microsoft.IdentityModel.Protocol.Extensions.Tests\Microsoft.IdentityModel.Protocol.Extensions.Tests.csproj" />
</ItemGroup>
<!-- Define build properties -->
<PropertyGroup>
<SourceDirectory>.\src</SourceDirectory>
<TestDirectory>.\tests</TestDirectory>
<Artifacts>.\Artifacts</Artifacts>
<TestOutputDirectory>$(Artifacts)\TestResults</TestOutputDirectory>
</PropertyGroup>
<Target Name="Build" DependsOnTargets="Clean;BuildDebug;BuildRelease" />
<!-- Clean the build in all configurations -->
<Target Name="Clean">
<!-- Clean the solutions -->
<Message Importance="high" Text="Cleaning the projects..." ContinueOnError="true" />
<MSBuild
Projects="@(SystemIdentityModelTokensJwt); @(SystemIdentityModelTokensJwtTests); @(MicrosoftIdentityModelProtocolExtensions); @(MicrosoftIdentityModelProtocolExtensionsTests)"
Targets="Clean"
Properties="Configuration=Debug"
ContinueOnError="true" />
<MSBuild
Projects="@(SystemIdentityModelTokensJwt); @(SystemIdentityModelTokensJwtTests); @(MicrosoftIdentityModelProtocolExtensions); @(MicrosoftIdentityModelProtocolExtensionsTests)"
Targets="Clean"
Properties="Configuration=Release"
ContinueOnError="true" />
</Target>
<Target Name="BuildDebug">
<Message Importance="high" Text="Building debug version the projects..." />
<MSBuild
Projects="@(SystemIdentityModelTokensJwt); @(SystemIdentityModelTokensJwtTests); @(MicrosoftIdentityModelProtocolExtensions); @(MicrosoftIdentityModelProtocolExtensionsTests)"
Targets="Build"
Properties="Configuration=Debug"
ContinueOnError="true" />
</Target>
<Target Name="BuildRelease">
<Message Importance="high" Text="Building release version the projects..." />
<MSBuild
Projects="@(SystemIdentityModelTokensJwt); @(SystemIdentityModelTokensJwtTests); @(MicrosoftIdentityModelProtocolExtensions); @(MicrosoftIdentityModelProtocolExtensionsTests)"
Targets="Build"
Properties="Configuration=Release"
ContinueOnError="true" />
</Target>
<Target Name="Tests" DependsOnTargets="Build">
<Message Importance="high" Text="Running scenario tests..." />
<Message Importance="high" Text="You are required to have installed a version of Visual Studio with support for MSTest (and MSTest on your path)." />
<ItemGroup>
<TestArtifacts Include="$(TestOutputDirectory)\**\*.*" />
</ItemGroup>
<Delete Files="@(TestArtifacts)" ContinueOnError="false" />
<RemoveDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<MakeDir Directories="$(TestOutputDirectory)\$(Ext)" ContinueOnError="true" />
<MakeDir Directories="$(TestOutputDirectory)\$(JWT)" ContinueOnError="true" />
<Message Importance="high" Text="Scenario tests:" />
<Exec Command="MSTest.exe /testcontainer:$(TestDirectory)\$(Ext).Tests\bin\debug\$(Ext).Tests.dll /resultsfile:$(TestOutputDirectory)\$(Ext)\FullTestRun.trx" ContinueOnError="true" />
<Exec Command="MSTest.exe /testcontainer:$(TestDirectory)\$(Jwt).Tests\bin\debug\$(Jwt).Tests.dll /resultsfile:$(TestOutputDirectory)\$(Jwt)\FullTestRun.trx" ContinueOnError="true" />
</Target>
</Project>