Merge pull request #34079 from NikolaMilosavljevic/libicu66
[platform/upstream/dotnet/runtime.git] / Build.proj
1 <Project Sdk="Microsoft.Build.Traversal">
2
3   <!--
4     Subsets are already imported by Directory.Build.props.
5     Reference the projects for traversal build. Ordering matters here.
6   -->
7   <ItemGroup>
8     <ProjectReference Include="@(CoreClrProject)" />
9     <ProjectReference Include="@(MonoProject)" />
10     <ProjectReference Include="@(LibrariesProject)" />
11     <ProjectReference Include="@(InstallerProject)" />
12   </ItemGroup>
13
14   <!--
15     Exclude installer depproj and pkgproj from static graph restore. We restore them below.
16     Remove when https://github.com/NuGet/Home/issues/9398 is fixed.
17   -->
18   <ItemGroup Condition="'$(MSBuildRestoreSessionId)' != ''">
19     <ProjectReference Remove="@(DepprojProjectToBuild)"  />
20     <ProjectReference Remove="@(PkgprojProjectToBuild)" />
21     <ProjectReference Remove="@(BundleProjectToBuild)" />
22   </ItemGroup>
23
24   <!-- Custom arcade target which isn't available in Microsoft.Build.Traversal. -->
25   <Target Name="Rebuild" DependsOnTargets="Clean;Build" />
26
27   <Import Project="$(RepositoryEngineeringDir)SubsetValidation.targets" />
28
29   <!-- Upfront restore hooks -->
30   <Import Project="$(RepositoryEngineeringDir)restore\docs.targets" Condition="'$(DotNetBuildFromSource)' != 'true'" />
31   <Import Project="$(RepositoryEngineeringDir)restore\optimizationData.targets" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(EnableNgenOptimization)' == 'true'" />
32   <Import Project="$(RepositoryEngineeringDir)restore\runtimeprops.targets" />
33
34   <!--
35     Use synthetic inputs/outputs to avoid building it all the time. This should let devs build with
36     MSBuild node reuse enabled (the Arcade default). If it were built every time, it would hit file
37     locking issues vs. the persistent nodes that loaded the task DLL for the previous build. It
38     isn't particularly accurate, but better than nothing.
39   -->
40   <Target Name="BuildRepoTasks"
41           DependsOnTargets="GetRepoTasksSrc"
42           BeforeTargets="Restore"
43           Inputs="@(RepoTasksSrc)"
44           Outputs="$(RepoTasksOutputFile)">
45     <ItemGroup>
46       <RepoTaskProjects Include="$(RepoTasksDir)**\*.csproj" />
47     </ItemGroup>
48
49     <MSBuild Projects="@(RepoTaskProjects)"
50              Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid());Configuration=Debug;Platform=AnyCPU"
51              Targets="Restore"/>
52
53     <MSBuild Projects="@(RepoTaskProjects)"
54              Properties="Configuration=Debug;Platform=AnyCPU"
55              Targets="Build"/>
56
57     <WriteLinesToFile File="$(RepoTasksOutputFile)"
58                       Lines="$(RepoTasksOutputFile)"
59                       Overwrite="true" />
60   </Target>
61
62   <Target Name="GetRepoTasksSrc">
63     <PropertyGroup>
64       <RepoTasksDir>$(RepoTasksDir)</RepoTasksDir>
65       <RepoTasksOutputFile>$(ArtifactsObjDir)runtime.tasks\Debug\build-semaphore.txt</RepoTasksOutputFile>
66     </PropertyGroup>
67
68     <ItemGroup>
69       <RepoTasksSrc Include="$(RepoTasksDir)**\*.cs*" />
70     </ItemGroup>
71   </Target>
72
73   <Target Name="RestoreWithoutStaticGraph"
74           BeforeTargets="Restore">
75     <MSBuild Projects="@(LibrariesRestoreProject);@(DepprojProjectToBuild);@(PkgprojProjectToBuild);@(BundleProjectToBuild)"
76              Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid());RestoreUseStaticGraphEvaluation=false"
77              Targets="Restore" />
78   </Target>
79
80 </Project>