forked from dotnet/corefx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.proj
109 lines (83 loc) · 4.79 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
<?xml version="1.0" encoding="utf-8"?>
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project DefaultTargets="Build">
<UsingTask TaskName="UpdateVSConfigurations" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
<Import Project="Directory.Build.props" />
<PropertyGroup>
<BuildRestore Condition="'$(BuildRestore)' == ''">true</BuildRestore>
<BuildNative Condition="'$(BuildNative)' == ''">true</BuildNative>
<BuildManaged Condition="'$(BuildManaged)' == ''">true</BuildManaged>
<BuildTests Condition="'$(BuildTests)' == ''">false</BuildTests>
<BuildPackages Condition="'$(BuildPackages)' == ''">true</BuildPackages>
<BuildDependsOn Condition="'$(BuildRestore)' == 'true'">$(BuildDependsOn);Restore</BuildDependsOn>
<BuildDependsOn Condition="'$(BuildNative)' == 'true'">$(BuildDependsOn);BuildNative</BuildDependsOn>
<BuildDependsOn Condition="'$(BuildManaged)' == 'true'">$(BuildDependsOn);BuildManaged</BuildDependsOn>
<BuildDependsOn Condition="'$(BuildTests)' == 'true'">$(BuildDependsOn);Test</BuildDependsOn>
<BuildDependsOn Condition="'$(BuildPackages)' == 'true'">$(BuildDependsOn);Pack</BuildDependsOn>
<!-- Explicitly set Configuration based on BuildConfiguration for the root projects -->
<ProjectProperties>Configuration=$(BuildConfiguration)</ProjectProperties>
</PropertyGroup>
<Import Project="$(ToolsDir)VersionTools.targets" Condition="Exists('$(ToolsDir)VersionTools.targets')" />
<Import Project="Directory.Build.targets" />
<Target Name="Restore" DependsOnTargets="GenerateConfigurationProps;RestoreOptionalToolingPackages;RestoreOptimizationDataPackage">
<ItemGroup>
<_RestoreProjects Include="external\dir.proj" />
</ItemGroup>
<MSBuild Projects="@(_RestoreProjects)" Properties="$(ProjectProperties)" />
</Target>
<Target Name="_IsProjectRestoreSupported"
Returns="@(_ValidProjectsForRestore)">
<ItemGroup>
<_ValidProjectsForRestore Include="$(MSBuildProjectFullPath)" />
</ItemGroup>
</Target>
<Target Name="BuildNative">
<ItemGroup>
<_BuildNativeProjects Include="src\Native\build-native.proj" />
</ItemGroup>
<MSBuild Projects="@(_BuildNativeProjects)" Properties="$(ProjectProperties)" />
</Target>
<Target Name="BuildManaged">
<ItemGroup>
<_BuildMangedProjects Include="src\dirs.proj" />
</ItemGroup>
<MSBuild Projects="@(_BuildMangedProjects)" Properties="$(ProjectProperties)" />
</Target>
<Target Name="Test">
<ItemGroup>
<_TestProjects Include="src\tests.builds" />
</ItemGroup>
<MSBuild Projects="@(_TestProjects)" Properties="$(ProjectProperties)" />
</Target>
<Target Name="Pack">
<ItemGroup>
<_PackProjects Include="src\packages.builds" />
</ItemGroup>
<MSBuild Projects="@(_PackProjects)" Properties="$(ProjectProperties)" />
</Target>
<Import Project="$(ToolsDir)clean.targets" />
<Target Name="Build" DependsOnTargets="$(BuildDependsOn)" />
<Target Name="Clean">
<RemoveDir Directories="$(ArtifactsObjDir)" />
<RemoveDir Directories="$(ArtifactsBinDir)" />
<RemoveDir Directories="$(ArtifactsPackagesDir)" />
</Target>
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<!-- 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')" />
<Target Name="UpdateVSConfigurations">
<Message Importance="High" Text="Updating configurations for projects ..." />
<ItemGroup>
<_projectsToExcludeFromUpdate Include="$(MSBuildThisFileDirectory)src/SharedFrameworkValidation/**/*.csproj" />
<_projectsToUpdate Include="$(MSBuildThisFileDirectory)src/**/*.*csproj" Exclude="@(_projectsToExcludeFromUpdate)" />
<_projectsToUpdate Include="$(MSBuildThisFileDirectory)src/**/*.*ilproj" Exclude="@(_projectsToExcludeFromUpdate)" />
<_projectsToUpdate Include="$(MSBuildThisFileDirectory)src/**/*.*vbproj" Exclude="@(_projectsToExcludeFromUpdate)" />
<_solutionsToUpdateFiles Include="$(MSBuildThisFileDirectory)src/*/Directory.Build.props" />
<_solutionsToUpdate Include="@(_solutionsToUpdateFiles->'%(RootDir)%(Directory)')" Exclude="@(_solutionsToExcludeFromUpdate)" />
</ItemGroup>
<UpdateVSConfigurations ProjectsToUpdate="@(_projectsToUpdate)" SolutionsToUpdate="@(_solutionsToUpdate)" />
<Message Importance="High" Text="Updating configurations for projects ... Done." />
</Target>
<!-- Define an empty Execute target for Arcade's publish to BAR finds it: https://github.com/dotnet/arcade/issues/1452 -->
<Target Name="Execute" />
</Project>