forked from OData/RESTier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RESTier.msbuild
98 lines (88 loc) · 5.12 KB
/
RESTier.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
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
88
89
90
91
92
93
94
95
96
97
98
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="tools\RESTier.tasks.targets"/>
<UsingTask AssemblyFile=".\packages\xunit.MSBuild.2.0.0.0\tools\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit"/>
<ItemGroup>
<SolutionsToBuild Include="RESTier.sln">
<BuildInParallel>$(BuildInParallel)</BuildInParallel>
</SolutionsToBuild>
</ItemGroup>
<PropertyGroup>
<ProjectGuid>{120146C7-7CFD-4857-ACC0-78C2CD83C2C2}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<NuGetFolder>.nuget</NuGetFolder>
<NuGetExe>$(NuGetFolder)\NuGet.exe</NuGetExe>
<CodeAnalysis Condition=" '$(CodeAnalysis)' == '' and '$(Configuration)' != 'Release' ">true</CodeAnalysis>
<AdditionalRestoreProps></AdditionalRestoreProps>
</PropertyGroup>
<PropertyGroup>
<TestDirectory>$(MSBuildThisFileDirectory)bin\$(Configuration)\</TestDirectory>
<TestResultsDirectory>$(TestDirectory)\TestResults\</TestResultsDirectory>
<ResultFileName>Result.xml</ResultFileName>
</PropertyGroup>
<!-- Test assemblies -->
<ItemGroup>
<TestAssembiles Include="test\Microsoft.Restier.TestCommon\bin\$(Configuration)\Microsoft.Restier.TestCommon.dll" />
<TestAssembiles Include="test\Microsoft.Restier.Core.Tests\bin\$(Configuration)\Microsoft.Restier.Core.Tests.dll" />
<TestAssembiles Include="test\Microsoft.Restier.Publishers.OData.Test\bin\$(Configuration)\Microsoft.Restier.Publishers.OData.Test.dll" />
<TestAssembiles Include="test\Microsoft.Restier.Providers.EntityFramework.Tests\bin\$(Configuration)\Microsoft.Restier.Providers.EntityFramework.Tests.dll" />
<TestAssembiles Include="test\ODataEndToEnd\Microsoft.OData.Service.Sample.Northwind.Tests\bin\$(Configuration)\Microsoft.OData.Service.Sample.Northwind.Tests.dll" />
<TestAssembiles Include="test\ODataEndToEnd\Microsoft.OData.Service.Sample.Tests\bin\$(Configuration)\Microsoft.OData.Service.Sample.Tests.dll" />
</ItemGroup>
<Target Name="DownloadNuGet" Condition=" '$(NotDownloadNuget)' != 'true' ">
<DownloadNuGet Condition="" OutputFileName="$(NuGetExe)" MinimumVersion="3.4.0" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="DownloadNuGet">
<Message Text="Restoring NuGet packages..." Importance="High" />
<Exec Command='"$(NuGetExe)" restore "%(SolutionsToBuild.Identity)" -PackagesDirectory packages -NonInteractive ^
-Verbosity detailed -ConfigFile "$(MsBuildThisFileDirectory)$(NuGetFolder)\NuGet.Config" ^
-NoCache $(AdditionalRestoreProps)' />
</Target>
<Target Name="BuildTools">
<PropertyGroup>
<FxCopProjectLocation>$(MsBuildThisFileDirectory)tools\src\Microsoft.Web.FxCop\</FxCopProjectLocation>
<CustomFxCopRulesPath>$(MsBuildThisFileDirectory)packages\CustomFxCopRules</CustomFxCopRulesPath>
</PropertyGroup>
<MsBuild
Condition=" '$(CodeAnalysis)' == 'true' "
Projects="$(FxCopProjectLocation)\Microsoft.Web.FxCop.csproj"
Properties="Configuration=Release;OutputPath=$(CustomFxCopRulesPath)" />
</Target>
<Target Name="Build" DependsOnTargets="RestorePackages;BuildTools">
<MakeDir Directories="bin\$(Configuration)" />
<MSBuild
Projects="@(SolutionsToBuild)"
BuildInParallel="%(SolutionsToBuild.BuildInParallel)"
Targets="Build"
Condition=" '%(SolutionsToBuild.Portable)' != 'true' or '$(BuildPortable)' == 'true' "
Properties="Configuration=$(Configuration);CodeAnalysis=$(CodeAnalysis);StyleCopEnabled=$(StyleCopEnabled);VisualStudioVersion=$(VisualStudioVersion)" />
</Target>
<Target Name="ProjectCopRun">
</Target>
<Target Name="StyleCopRun">
</Target>
<Target Name="Clean">
<MSBuild
Projects="@(SolutionsToBuild)"
BuildInParallel="%(SolutionsToBuild.BuildInParallel)"
Targets="Clean"
Condition=" '%(SolutionsToBuild.Portable)' != 'true' or '$(BuildPortable)' == 'true' "
Properties="Configuration=$(Configuration);VisualStudioVersion=$(VisualStudioVersion)" />
<RemoveDir Directories="bin\$(Configuration)" />
</Target>
<Target Name="Rebuild" DependsOnTargets="RestorePackages;BuildTools">
<MSBuild
Projects="@(SolutionsToBuild)"
BuildInParallel="%(SolutionsToBuild.BuildInParallel)"
Targets="ReBuild"
Condition=" '%(SolutionsToBuild.Portable)' != 'true' or '$(BuildPortable)' == 'true' "
Properties="Configuration=$(Configuration);CodeAnalysis=$(CodeAnalysis);StyleCopEnabled=$(StyleCopEnabled);VisualStudioVersion=$(VisualStudioVersion);OutputPath=$(OutputPath)Product;EnableProjectCop=false" />
</Target>
<Target Name="RunTests" DependsOnTargets="Build">
<RemoveDir Directories="$(TestResultsDirectory)" />
<MakeDir Directories="$(TestResultsDirectory)" />
<Message Text="{Running Test Begin}" Importance="High" />
<xunit Assemblies="@(TestAssembiles)" Xml="$(TestResultsDirectory)\$(ResultFileName)" ParallelizeTestCollections="false" />
<Message Text="{Running Test End}" Importance="High" />
<Message Text="" Importance="High" />
</Target>
</Project>