Merge branch 'release/3.0' into merge/master-to-release/3.0
[platform/upstream/coreclr.git] / build.proj
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build"
3   xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4   <Import Project="dir.props" />
5
6   <ItemGroup>
7     <!-- We use build.proj instead of dirs.proj so we don't conflict with the TFS build-->
8     <Project Include="src\build.proj" />
9   </ItemGroup>
10
11   <Import Project="dir.targets" />
12
13   <Import Project="dir.traversal.targets" />
14
15   <Import Project="$(ToolsDir)clean.targets" />
16
17   <!-- The following properties are in place to keep the behavior of build.cmd while we work on the dev workflow steps. -->
18   <PropertyGroup>
19     <!-- To disable the restoration of packages, set RestoreDuringBuild=false or pass /p:RestoreDuringBuild=false.-->
20     <RestoreDuringBuild Condition="'$(RestoreDuringBuild)'==''">true</RestoreDuringBuild>
21   </PropertyGroup>
22
23   <!-- Override clean from dir.traversal.targets and just remove the full BinDir -->
24   <Target Name="Clean">
25     <Delete Files="$(BinDir)SOS.NETCore.*" />
26     <Delete Files="$(BinDir)mscorlib.*" />
27     <Delete Files="$(BinDir)System.Private.CoreLib.*" />
28     <Delete Files="$(BinDir)netcoreapp2.0/R2RDump.*" />
29   </Target>
30
31   <!--
32     BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
33     target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
34     the tools are fetched before "Build".
35   -->
36   <Target Name="Sync" BeforeTargets="Build" DependsOnTargets="RestoreOptData;RestoreNETCorePlatforms" />
37
38   <Target Name="RestoreOptData" Condition="'$(RestoreDuringBuild)'=='true' and '$(BuildType)'=='Release'">
39     <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/optdata/optdata.csproj" StandardOutputImportance="Low" />
40   </Target>
41
42   <Target Name="RestoreNETCorePlatforms" Condition="'$(RestoreDuringBuild)'=='true'">
43     <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj" StandardOutputImportance="Low" />
44   </Target>
45
46   <Target Name="CleanAllProjects">
47     <Message Condition="Exists($(RootBinDir))" Importance="High" Text="Removing $(RootBinDir)"/>
48     <RemoveDir Directories="$(RootBinDir)" />
49   </Target>
50
51 </Project>