-
Notifications
You must be signed in to change notification settings - Fork 0
/
FurcadiaDiagnostics.build.msbuildproj
61 lines (51 loc) · 2.7 KB
/
FurcadiaDiagnostics.build.msbuildproj
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir>$(MSBuildThisFileDirectory)</SolutionDir>
<Configuration Condition=" '$(Configuration)'=='' ">Release</Configuration>
<NuGetExe Condition=" '$(NuGetExe)'=='' ">packages/nuget.exe</NuGetExe>
<NuGetExeDir>packages/</NuGetExeDir>
<NuGetDownloadAddress Condition=" '$(NuGetDownloadAddress)'=='' ">http://nuget.org/nuget.exe</NuGetDownloadAddress>
<NuGetCommand Condition=" '$(NuGetCommand)'=='' AND '$(OS)' == 'Windows_NT'">"$(NuGetExe)"</NuGetCommand>
<NuGetCommand Condition=" '$(NuGetCommand)'=='' AND '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 "$(NuGetExe)"</NuGetCommand>
<Properties>Configuration=$(Configuration);SolutionDir=$(SolutionDir)</Properties>
</PropertyGroup>
<ItemGroup>
<Solution Include="*.sln" />
<TestProjects Include="**\*.Tests.csproj" />
</ItemGroup>
<UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" Condition=" '$(OS)' == 'Windows_NT' ">
<ParameterGroup>
<Address ParameterType="System.String" Required="true"/>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System" />
<Code Type="Fragment" Language="cs">
<![CDATA[
new System.Net.WebClient().DownloadFile(Address, OutputFilename);
]]>
</Code>
</Task>
</UsingTask>
<Target Name="DownloadNuGet">
<MakeDir Directories="$(NuGetExeDir)" Condition=" !Exists('$(NuGetExeDir)') " />
<DownloadFile Address="$(NuGetDownloadAddress)" OutputFilename="$(NuGetExe)" Condition=" '$(OS)' == 'Windows_NT' AND !Exists('$(NuGetExe)')" />
<Exec Command="wget $(NuGetDownloadAddress) -O $(NuGetExe)" Condition=" '$(OS)' != 'Windows_NT' AND !Exists('$(NuGetExe)') " />
</Target>
<Target Name="RestorePackages" DependsOnTargets="DownloadNuGet">
<Exec Command="$(NuGetCommand) restore "%(Solution.Identity)"" />
</Target>
<Target Name="Clean">
<MSBuild Targets="Clean" Projects="@(Solution)" Properties="$(Properties)" />
</Target>
<Target Name="Build" DependsOnTargets="RestorePackages">
<MSBuild Targets="Build" Projects="@(Solution)" Properties="$(Properties)" />
</Target>
<Target Name="Rebuild" DependsOnTargets="RestorePackages">
<MSBuild Targets="Rebuild" Projects="@(Solution)" Properties="$(Properties)" />
</Target>
<Target Name="RunTests" DependsOnTargets="Build">
<MSBuild Targets="RunTests" Projects="@(TestProjects)" Properties="$(Properties)" />
</Target>
</Project>