This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.proj
66 lines (55 loc) · 2.51 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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="14.0">
<!--Import Build Tasks-->
<Import Project="$(MSBuildThisFileDirectory)Build.tasks" />
<!--Properties-->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<BuildEnvironment Condition=" '$(BuildEnvironment)' == '' ">Windows</BuildEnvironment>
<BuildToolsPath>$(MSBuildThisFileDirectory)build\</BuildToolsPath>
<TargetSolution>$(MSBuildThisFileDirectory)BuildTools.sln</TargetSolution>
</PropertyGroup>
<!--Properties: NuGet-->
<PropertyGroup>
<NuGetPath>$(BuildToolsPath)</NuGetPath>
<NuGetCommand>nuget.exe</NuGetCommand>
</PropertyGroup>
<!--Target: Check Preconditions-->
<Target Name="CheckPreconditions">
<Error Condition=" '$(BuildEnvironment)' != 'Windows' " Text="The build environment is currently limited to Windows." />
</Target>
<!--Target: Check Prerequisites-->
<Target Name="CheckPrerequisites" DependsOnTargets="CheckPreconditions">
<FindNuGet Condition="!Exists('$(NuGetPath)nuget.exe')" ContinueOnError="true">
<Output TaskParameter="Result" PropertyName="NuGetPath" />
</FindNuGet>
<MakeDir Directories="$(NuGetPath)" Condition="!Exists('$(NuGetPath)')" />
<DownloadNuGet OutputFile="$(NuGetPath)nuget.exe" Condition="!Exists('$(NuGetPath)nuget.exe')" />
</Target>
<!--Target: Restore Packages-->
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Error Condition="!Exists('$(NuGetPath)nuget.exe')" Text="Unable to locate NuGet executable." />
<Exec Command="$(NuGetPath)$(NuGetCommand) restore "$(TargetSolution)" "/>
</Target>
<!-- Target: Build (Default)-->
<Target Name="Build" DependsOnTargets="RestorePackages">
<MSBuild BuildInParallel="true"
Projects="$(TargetSolution)"
Properties="RestorePackages=false;TreatWarningsAsErrors=true"
Targets="Build" />
</Target>
<!--Target: Clean-->
<Target Name="Clean">
<MSBuild BuildInParallel="true"
Projects="$(TargetSolution)"
Properties="RestorePackages=false"
Targets="Clean" />
</Target>
<!--Target: Rebuild-->
<Target Name="Rebuild">
<MSBuild BuildInParallel="true"
Projects="$(TargetSolution)"
Properties="RestorePackages=false;TreatWarningsAsErrors=true"
Targets="Rebuild" />
</Target>
</Project>