1 <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.5 version of the tasks.
22 <BuildToolsTargets45>true</BuildToolsTargets45>
25 <!-- Common properties -->
27 <!-- Set basic properties and normalize -->
29 <BuildArch>$(__BuildArch)</BuildArch>
30 <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
31 <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
33 <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
34 <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
35 <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
36 <BuildType Condition="'$(__BuildType)' == 'checked'">Checked</BuildType>
38 <BuildOS>$(__BuildOS)</BuildOS>
39 <BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>
41 <ProjectDir>$(__ProjectDir)\</ProjectDir>
42 <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>
44 <SourceDir>$(__SourceDir)\</SourceDir>
45 <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>
47 <PackagesDir>$(__PackagesDir)\</PackagesDir>
48 <PackagesDir Condition="'$(__PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
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 <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>
58 <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
59 fails to write packages to it if the path contains the forward slash.
61 <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
62 <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
64 <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
65 <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/bin/</DotnetCliPath>
66 <BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
68 <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
69 <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
70 <BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net45/</BuildToolsTaskDir>
74 <!-- Import Build tools common props file where repo-independent properties are found -->
75 <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
78 <!-- Common nuget properties -->
80 <NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(PackagesDir)NuGet.exe</NuGetToolPath>
81 <NuGetConfigFile Condition="'$(NuGetConfigFile)'==''">$(SourceDir)NuGet.Config</NuGetConfigFile>
82 <NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>
84 <NugetRestoreCommand>"$(NuGetToolPath)"</NugetRestoreCommand>
85 <NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
86 <!-- Trim off the last slash so that nuget doesn't get confused and say there are illegal characters on
88 <NugetRestoreCommand>$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('\\'))"</NugetRestoreCommand>
89 <NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
90 <NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
91 <NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
95 <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
96 <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>
98 <DnuRestoreCommand>"$(DotnetToolCommand)"</DnuRestoreCommand>
99 <DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
100 <DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand>
101 <DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand>
104 <!-- Setup Nuget properties -->
106 <NuSpecSrcs Include="$(SourceDir)\.nuget\toolchain.win7-x64.Microsoft.DotNet.RyuJit.nuspec" />
109 <!-- Backslash appended, see note in dir.props about the PackagesBinDir property -->
110 <NuSpecs Include="$(PackagesBinDir)\toolchain.win7-x64.Microsoft.DotNet.RyuJit.nuspec" />
114 Set up Roslyn predefines
117 <RoslynPackageDir>$(PackagesDir)/$(RoslynPackageName).$(RoslynVersion)/</RoslynPackageDir>
118 <RoslynPropsFile>$(RoslynPackageDir)build/Microsoft.Net.ToolsetCompilers.props</RoslynPropsFile>
121 <!-- Setup common target properties that we use to conditionally include sources -->
123 <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
124 <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
125 <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
126 <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
128 <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
130 <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
131 <DistroName Condition="'$(TargetsLinux)' == 'true'">$(__DistroName)</DistroName>
135 <!-- Packaging properties -->
137 <PreReleaseLabel>rc3</PreReleaseLabel>
138 <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
139 <PackageLicenseFile>$(SourceDir).nuget/dotnet_library_license.txt</PackageLicenseFile>
140 <PackageThirdPartyNoticesFile>$(SourceDir).nuget/ThirdPartyNotices.txt</PackageThirdPartyNoticesFile>
142 <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
143 <RuntimeIdGraphDefinitionFile>$(PackagesDir)/Microsoft.NETCore.Platforms/1.0.1-rc2-23712/runtime.json</RuntimeIdGraphDefinitionFile>
145 <!-- On Windows, MSbuild still runs against Desktop FX while it runs on .NET Core on non-Windows. this requires
146 pulling in different packaging dependencies.
148 <PackagingTaskDir Condition="'$(TargetsWindows)' == 'true'">$(ToolsDir)net45/</PackagingTaskDir>
149 <BuildNumberMajor Condition="'$(BuildNumberMajor)' == ''">00001</BuildNumberMajor>
150 <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
151 <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(BuildArch)</PackagePlatform>
152 <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
153 <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath>