+<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-
<!--
$(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
-->
<PropertyGroup>
+ <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
<OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
</PropertyGroup>
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.
-->
<PropertyGroup>
- <BuildToolsTargets45>true</BuildToolsTargets45>
+ <RunningOnCore>false</RunningOnCore>
+ <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'Core'">true</RunningOnCore>
+ <BuildToolsTargetsDesktop>false</BuildToolsTargetsDesktop>
+ <BuildToolsTargetsDesktop Condition="'$(RunningOnCore)' != 'true'">true</BuildToolsTargetsDesktop>
+ <BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
+ <RunningOnUnix Condition="('$(RunningOnUnix)' == '') And ('$(MSBuildRuntimeType)' == 'Core')">true</RunningOnUnix>
</PropertyGroup>
<!-- Common repo directories -->
<SourceDir>$(ProjectDir)src\</SourceDir>
<PackagesDir>$(ProjectDir)..\packages\</PackagesDir>
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)..\Tools\</ToolsDir>
- <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
- <BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net46/</BuildToolsTaskDir>
- <SkipImportILTargets>true</SkipImportILTargets>
+ <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli\</DotnetCliPath>
+ <BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net46\</BuildToolsTaskDir>
+ <OverrideToolHost Condition="'$(OS)' != 'Windows_NT'">$(DotnetCliPath)dotnet</OverrideToolHost>
+ <CSharpCoreTargetsPath Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(ToolsDir)\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath>
+ <!-- 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
+ the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
+ <_TargetFrameworkDirectories Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
+ <_FullFrameworkReferenceAssemblyPaths Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
+ <ExcludeSigningImport>true</ExcludeSigningImport>
</PropertyGroup>
<!-- Common properties -->
<PropertyGroup>
<RootBinDir>$(__RootBinDir)\</RootBinDir>
<RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)..\bin\</RootBinDir>
+
+ <BinDir>$(__BinDir)\</BinDir>
+ <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
+
+ <CoreCLRBinDir>$(RootBinDir)Product\$(__BuildOS).$(__BuildArch).$(__BuildType)\</CoreCLRBinDir>
</PropertyGroup>
<!-- Default Test platform to deploy the netstandard compiled tests to -->
<!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
<Import Project="$(ProjectDir)..\dependencies.props" />
- <ItemGroup>
- <!-- Need to escape double forward slash (%2F) or MSBuild will normalize to one slash on Unix. -->
- <DotnetSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
- <DotnetSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-core/api/v3/index.json" />
- <DotnetSourceList Include="https:%2F%2Fapi.nuget.org/v3/index.json" />
- </ItemGroup>
-
+ <!-- Add test-specific package restore sources. -->
+ <PropertyGroup>
+ <RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
+ https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json;
+ $(RestoreSources)
+ </RestoreSources>
+ <RestoreSources Condition="'$(IntermediateAzureFeed)' != ''">
+ $(IntermediateAzureFeed);
+ $(RestoreSources)
+ </RestoreSources>
+ </PropertyGroup>
+
+ <!-- Use Roslyn Compilers to build -->
+ <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
+ <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
+
<PropertyGroup Condition="'$(BuildAllProjects)'=='true'">
<!-- When we do a traversal build we get all packages up front, don't restore them again -->
<RestorePackages>false</RestorePackages>
</PropertyGroup>
+ <PropertyGroup Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'">
+ <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
+ </PropertyGroup>
+
+ <!-- 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 -->
+ <Import Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'" Project="$(BuildVersionFile)" />
+
+ <PropertyGroup Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'">
+ <VersionToRestore Condition="'$(StableVersion)' != ''">$(StableVersion)</VersionToRestore>
+ <VersionToRestore Condition="'$(VersionToRestore)' == ''">$(PackageVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)</VersionToRestore>
+ <PackageVersionArg>/p:MicrosoftNETCoreRuntimeCoreCLRPackageVersion=$(VersionToRestore)</PackageVersionArg>
+ </PropertyGroup>
+
<!-- Which tests shall we build? Default: Priority 0 tests.
At the command-line, the user can specify /p:CLRTestPriorityToBuild=666 (for example), and
all tests with CLRTestPriority 666,..., 1 AND 0 will build.