forked from dotnet/corefx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.proj
111 lines (92 loc) · 4.72 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="dir.props" />
<!-- required to build the projects in their specified order -->
<PropertyGroup>
<SerializeProjects>true</SerializeProjects>
</PropertyGroup>
<PropertyGroup>
<GenerateCodeCoverageReportForAll>true</GenerateCodeCoverageReportForAll>
</PropertyGroup>
<PropertyGroup>
<BuildPackages Condition="'$(BuildPackages)'==''">true</BuildPackages>
</PropertyGroup>
<Import Project="$(ToolsDir)CodeCoverage.targets" Condition="Exists('$(ToolsDir)CodeCoverage.targets')" />
<Import Project="$(ToolsDir)PerfTesting.targets" Condition="Exists('$(ToolsDir)PerfTesting.targets') and '$(Performance)' == 'true'"/>
<Import Project="$(ToolsDir)VersionTools.targets" Condition="Exists('$(ToolsDir)VersionTools.targets')" />
<ItemGroup>
<Project Include="external\dir.proj" />
<Project Include="src\dirs.proj" />
<!-- signing must happen before packaging -->
<Project Include="src\sign.builds" />
<Project Include="src\packages.builds" Condition="'$(BuildPackages)'=='true'" />
<!--
<Project Include="src\post.builds">
<!- For the root traversal default filter the OSGroup to the OSEnvironment which is the OS we are running on -!>
<FilterToOSGroup Condition="'$(_OriginalOSGroup)' == ''">$(OSEnvironment)</FilterToOSGroup>
</Project>
-->
</ItemGroup>
<Import Project="dir.targets" />
<Import Project="dir.traversal.targets" />
<Import Project="$(ToolsDir)clean.targets" />
<PropertyGroup>
<TraversalBuildDependsOn>
BuildCoreFxTools;
CreateOrUpdateCurrentVersionFile;
$(TraversalBuildDependsOn);
</TraversalBuildDependsOn>
</PropertyGroup>
<Target Name="BuildCoreFxTools">
<ItemGroup>
<BuildToolsProject Include="src\Tools\CoreFx.Tools\CoreFx.Tools.csproj" />
<BuildToolsProject Include="src\Tools\CoreFx.Tools\CoreFx.Tools.csproj">
<TargetGroup>net46</TargetGroup>
</BuildToolsProject>
<BuildToolsProject Include="src\Tools\GenerateProps\GenerateProps.proj" />
</ItemGroup>
<MSBuild Projects="@(BuildToolsProject)"
ContinueOnError="ErrorAndContinue"
Condition="'%(Identity)' != ''"
Properties="Configuration=%(BuildToolsProject.TargetGroup);TargetGroup=%(BuildToolsProject.TargetGroup)" />
</Target>
<Target Name="Sync" DependsOnTargets="BuildCoreFxTools">
<ItemGroup>
<ExternalProject Include="external\dir.proj" />
</ItemGroup>
<MSBuild Projects="@(ExternalProject)"
ContinueOnError="ErrorAndContinue" />
</Target>
<UsingTask TaskName="ValidateVSConfigurations" AssemblyFile="$(CoreFxToolsTaskDir)CoreFx.Tools.dll"/>
<Target Name="ValidateVSConfigurations" DependsOnTargets="BuildCoreFxTools" Condition="'$(CheckProjectConfiguration)'=='true'">
<Message Importance="High" Text="Validating configurations for projects ..." />
<ItemGroup>
<ProjectsToCheckHeaders Include="$(MSBuildThisFileDirectory)src/**/*.*proj" Exclude="@(ProjectExclusions)" />
</ItemGroup>
<ValidateVSConfigurations ProjectsToValidate="@(ProjectsToCheckHeaders)" />
<Message Importance="High" Text="Validating configurations for projects ... Done." />
</Target>
<!-- TODO: Can we move this archive test build to BuildTools -->
<UsingTask TaskName="ZipFileCreateFromDependencyLists" Condition="'$(Platform)' == 'ARM64' and '$(ArchiveTests)' == 'true'" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
<Target Name="ArchiveTestBuild" Condition="'$(Platform)' == 'ARM64' and '$(ArchiveTests)' == 'true'" AfterTargets="Build" >
<ItemGroup>
<ExcludeFromArchive Include="nupkg$" />
<ExcludeFromArchive Include="Microsoft.DotNet.BuildTools" />
<ExcludeFromArchive Include="TestData" />
<TestDependencyListFile Include="$(BinDir)/TestDependencies/*.dependencylist.txt" />
</ItemGroup>
<ZipFileCreateFromDependencyLists
DependencyListFiles="@(TestDependencyListFile)"
DestinationArchive="$(TestWorkingDir)$(OSPlatformConfig)/archive/Packages.zip"
RelativePathBaseDirectory="$(PackagesDir)"
OverwriteDestination="true" />
</Target>
<!-- Override CleanAllProjects from dir.traversal.targets and just remove the full BinDir -->
<Target Name="CleanAllProjects">
<RemoveDir Directories="$(BinDir)" />
<!-- Temporarily outside BinDir -->
<RemoveDir Directories="$(PackageInstallPath)" />
</Target>
<!-- Hook that can be used to insert custom build tasks to the build process such as setup and/or cleanup tasks -->
<Import Project="build.override.targets" Condition="Exists('build.override.targets')" />
</Project>