1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
7 <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
8 <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
11 <!-- Build Tools Versions -->
13 <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
14 <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
18 Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
19 as well as runnning the build on mono. Until we can get these sorted out we will continue using the .NET 4.6 version of the tasks.
22 <RunningOnCore>false</RunningOnCore>
23 <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'Core'">true</RunningOnCore>
24 <BuildToolsTargetsDesktop>false</BuildToolsTargetsDesktop>
25 <BuildToolsTargetsDesktop Condition="'$(RunningOnCore)' != 'true'">true</BuildToolsTargetsDesktop>
26 <BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
27 <RunningOnUnix Condition="('$(RunningOnUnix)' == '') And ('$(MSBuildRuntimeType)' == 'Core')">true</RunningOnUnix>
30 <!-- Common repo directories -->
32 <CopyNuGetImplementations Condition="'$(CopyNuGetImplementations)'==''">false</CopyNuGetImplementations>
33 <ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
34 <SourceDir>$(ProjectDir)src\</SourceDir>
35 <PackagesDir>$(ProjectDir)..\packages\</PackagesDir>
36 <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)..\Tools\</ToolsDir>
37 <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli\</DotnetCliPath>
38 <BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net46\</BuildToolsTaskDir>
39 <OverrideToolHost Condition="'$(OS)' != 'Windows_NT'">$(DotnetCliPath)dotnet</OverrideToolHost>
40 <CSharpCoreTargetsPath Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(ToolsDir)\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath>
41 <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
42 the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
43 <_TargetFrameworkDirectories Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
44 <_FullFrameworkReferenceAssemblyPaths Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
45 <ExcludeSigningImport>true</ExcludeSigningImport>
48 <!-- Common properties -->
50 <RootBinDir>$(__RootBinDir)\</RootBinDir>
51 <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)..\bin\</RootBinDir>
53 <BinDir>$(__BinDir)\</BinDir>
54 <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
56 <CoreCLRBinDir>$(RootBinDir)Product\$(__BuildOS).$(__BuildArch).$(__BuildType)\</CoreCLRBinDir>
59 <!-- Default Test platform to deploy the netstandard compiled tests to -->
61 <!-- we default TestTFM and FilterToTestTFM to netcoreapp1.0 if they are not explicity defined -->
62 <DefaultTestTFM Condition="'$(DefaultTestTFM)'==''">netcoreapp1.0</DefaultTestTFM>
63 <TestTFM Condition="'$(TestTFM)'==''">$(DefaultTestTFM)</TestTFM>
64 <FilterToTestTFM Condition="'$(FilterToTestTFM)'==''">$(DefaultTestTFM)</FilterToTestTFM>
69 <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
70 <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</IntermediateOutputPath>
71 <OutputPath Condition="'$(OutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</OutputPath>
74 <!-- Targeting Package paths -->
76 <TargetingPackPath Condition="'$(BaseTargetingPackPath)' == ''">$(RootBinDir)TargetingPack\</TargetingPackPath>
79 <!-- Import Build tools common props file where repo-independent properties are found -->
80 <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
82 <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
83 <Import Project="$(ProjectDir)..\dependencies.props" />
85 <!-- Add test-specific package restore sources. -->
87 <RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
88 https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json;
91 <RestoreSources Condition="'$(IntermediateAzureFeed)' != ''">
92 $(IntermediateAzureFeed);
97 <!-- Use Roslyn Compilers to build -->
98 <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
99 <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
101 <PropertyGroup Condition="'$(BuildAllProjects)'=='true'">
102 <!-- When we do a traversal build we get all packages up front, don't restore them again -->
103 <RestorePackages>false</RestorePackages>
106 <PropertyGroup Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'">
107 <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
110 <!-- If we want to overwrite the desired CoreCLR package version, we need to get the new version from the generated props file in bin/obj -->
111 <Import Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'" Project="$(BuildVersionFile)" />
113 <PropertyGroup Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'">
114 <VersionToRestore Condition="'$(StableVersion)' != ''">$(StableVersion)</VersionToRestore>
115 <VersionToRestore Condition="'$(VersionToRestore)' == ''">$(PackageVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)</VersionToRestore>
116 <PackageVersionArg>/p:MicrosoftNETCoreRuntimeCoreCLRPackageVersion=$(VersionToRestore)</PackageVersionArg>
119 <!-- Which tests shall we build? Default: Priority 0 tests.
120 At the command-line, the user can specify /p:CLRTestPriorityToBuild=666 (for example), and
121 all tests with CLRTestPriority 666,..., 1 AND 0 will build.
123 Consequently, specifying CLRTestPriorityToBuild=1 will build all tests with CLRTestPriority 1 and 0.
125 CLRTestPriority = 0 will build only priority 0 cases.
127 In other words, the CLRTestPriority cases of 0 are *essential* testcases. The higher the value,
128 the less priority we give them.
131 <CLRTestPriorityToBuild>0</CLRTestPriorityToBuild>