forked from ChadBurggraf/plists-cs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.proj
87 lines (73 loc) · 3.9 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
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="FxCop" AssemblyFile="Tools\FxCopTask\FxCopTask.dll"/>
<PropertyGroup>
<ArtifactDir>$(MSBuildProjectDirectory)\Artifacts</ArtifactDir>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<BuildDir>$(MSBuildProjectDirectory)\Build</BuildDir>
<KeyFile>$(MSBuildProjectDirectory)\Source\System.Runtime.Serialization.Plists.snk</KeyFile>
<LibraryDir>$(MSBuildProjectDirectory)\Source\System.Runtime.Serialization.Plists</LibraryDir>
<MsTestPath>$(MSBuildExtensionsPath32)\..\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe</MsTestPath>
<TestDir>$(MSBuildProjectDirectory)\Source\System.Runtime.Serialization.Plists.Test</TestDir>
</PropertyGroup>
<Choose>
<When Condition="Exists('$(KeyFile)')">
<PropertyGroup>
<KeyFileArgs>/keyfile:"$(KeyFile)"</KeyFileArgs>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
</Otherwise>
</Choose>
<ItemGroup>
<CompileProjects Include="$(LibraryDir)\System.Runtime.Serialization.Plists.csproj"/>
<CompileProjects Include="$(TestDir)\System.Runtime.Serialization.Plists.Test.csproj" Condition="'$(Configuration)' == 'Debug'"/>
</ItemGroup>
<Target Name="Clean">
<MSBuild Projects="@(CompileProjects)" Targets="Clean" Properties="Configuration=$(Configuration)"/>
</Target>
<Target Name="CleanAll" DependsOnTargets="Clean">
<RemoveDir Directories="$(ArtifactDir)"/>
<RemoveDir Directories="$(BuildDir)"/>
</Target>
<Target Name="Compile">
<MSBuild Projects="@(CompileProjects)" Properties="Configuration=$(Configuration);SignAssembly=$(SignAssembly);AssemblyOriginatorKeyFile=$(KeyFile)"/>
</Target>
<Target Name="Build" DependsOnTargets="CodeAnalysis;Compile">
<MakeDir Directories="$(BuildDir)"/>
<ItemGroup>
<ReleaseFiles Include="$(LibraryDir)\bin\$(Configuration)\System.Runtime.Serialization.Plists.dll"/>
<ReleaseFiles Include="$(LibraryDir)\bin\$(Configuration)\System.Runtime.Serialization.Plists.pdb"/>
<ReleaseFiles Include="$(LibraryDir)\bin\$(Configuration)\System.Runtime.Serialization.Plists.xml"/>
<ReleaseFiles Include="$(MSBuildProjectDirectory)\LICENSE.txt"/>
<ReleaseFiles Include="$(MSBuildProjectDirectory)\README.md"/>
</ItemGroup>
<Copy SourceFiles="@(ReleaseFiles)" DestinationFolder="$(BuildDir)"/>
</Target>
<Target Name="Clean">
<RemoveDir Directories="$(BuildDir)"/>
<MSBuild Projects="@(Projects)" Targets="Clean" Properties="Configuration=$(Configuration)"/>
</Target>
<Target Name="CodeAnalysis">
<CallTarget Targets="FxCop"/>
<CallTarget Targets="Test"/>
</Target>
<Target Name="FxCop" DependsOnTargets="Compile">
<ItemGroup>
<FxCopAssemblies Include="$(LibraryDir)\System.Runtime.Serialization.Plists\bin\$(Configuration)\System.Runtime.Serialization.Plists.dll"/>
<FxCopAssemblies Include="$(TestDir)\System.Runtime.Serialization.Plists.Test\bin\$(Configuration)\System.Runtime.Serialization.Plists.Test.dll"/>
</ItemGroup>
<MakeDir Directories="$(ArtifactDir)"/>
<FxCop Assemblies="@(FxCopAssemblies)" Output="$(ArtifactDir)\FxCop.xml"/>
</Target>
<Target Name="Test" Condition="Exists('$(MsTestPath)')">
<MakeDir Directories="$(ArtifactDir)"/>
<Delete Files="$(ArtifactDir)\Tests.trx"/>
<MSBuild Projects="$(TestDir)\System.Runtime.Serialization.Plists.Test.csproj" Properties="Configuration=Debug"/>
<Exec Command='"$(MsTestPath)" /testcontainer:"$(TestDir)\bin\Debug\System.Runtime.Serialization.Plists.Test.dll" /runconfig:"$(MSBuildProjectDirectory)\Source\LocalTestRun.testrunconfig" /resultsfile:"$(ArtifactDir)\Tests.trx"'/>
</Target>
</Project>