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 <!-- Version numbers for both managed & native binaries -->
13 <MajorVersion>4</MajorVersion>
14 <MinorVersion>6</MinorVersion>
17 <!-- Build Tools Versions -->
19 <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
20 <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
24 Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
25 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.
28 <BuildToolsTargets45>true</BuildToolsTargets45>
31 <!-- Common properties -->
33 <!-- Set basic properties and normalize -->
34 <BuildArch>$(__BuildArch)</BuildArch>
35 <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
36 <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
38 <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
39 <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
40 <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
41 <BuildType Condition="'$(__BuildType)' == 'checked'">Checked</BuildType>
43 <BuildOS>$(__BuildOS)</BuildOS>
44 <BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>
46 <ProjectDir>$(__ProjectDir)\</ProjectDir>
47 <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>
49 <SourceDir>$(__SourceDir)\</SourceDir>
50 <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>
52 <PackagesDir>$(__PackagesDir)\</PackagesDir>
53 <PackagesDir Condition="'$(__PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
55 <RootBinDir>$(__RootBinDir)\</RootBinDir>
56 <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
58 <BinDir>$(__BinDir)\</BinDir>
59 <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
61 <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS).$(BuildArch).$(BuildType)</__IntermediatesDir>
62 <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>
64 <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
65 fails to write packages to it if the path contains the forward slash.
67 <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
68 <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
70 <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
71 <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
72 <OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost>
73 <BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
75 <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
76 <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
78 <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
79 <Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>
85 <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
86 <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</IntermediateOutputPath>
87 <OutputPath Condition="'$(OutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</OutputPath>
88 <FinalOutputPath Condition="'$(FinalOutputPath)' == ''">$(BinDir)</FinalOutputPath>
91 <Import Condition="Exists('$(ToolsDir)BuildVersion.targets')" Project="$(ToolsDir)BuildVersion.targets" />
93 <!-- Import Build tools common props file where repo-independent properties are found -->
94 <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
97 <!-- Common nuget properties -->
99 <NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(PackagesDir)NuGet.exe</NuGetToolPath>
100 <NuGetConfigFile Condition="'$(NuGetConfigFile)'==''">$(SourceDir)NuGet.Config</NuGetConfigFile>
101 <NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>
103 <NugetRestoreCommand>"$(NuGetToolPath)"</NugetRestoreCommand>
104 <NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
105 <!-- Trim off the last slash so that nuget doesn't get confused and say there are illegal characters on
107 <NugetRestoreCommand>$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('\\'))"</NugetRestoreCommand>
108 <NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
109 <NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
110 <NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
114 <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
115 <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>
117 <DnuRestoreCommand>$(DnuRestoreCommand) "$(DotnetToolCommand)"</DnuRestoreCommand>
118 <DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
119 <DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand>
122 <!-- Setup common target properties that we use to conditionally include sources -->
124 <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
125 <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
126 <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
127 <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
128 <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
130 <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
132 <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
133 <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
137 <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
138 <Import Project="$(ProjectDir)dependencies.props" />
140 <!-- Packaging properties -->
142 <PreReleaseLabel>beta</PreReleaseLabel>
143 <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
144 <PackageLicenseFile>$(SourceDir).nuget/dotnet_library_license.txt</PackageLicenseFile>
145 <PackageThirdPartyNoticesFile>$(SourceDir).nuget/ThirdPartyNotices.txt</PackageThirdPartyNoticesFile>
147 <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
148 <RuntimeIdGraphDefinitionFile>$(PackagesDir)/Microsoft.NETCore.Platforms/1.0.2-beta-24224-02/runtime.json</RuntimeIdGraphDefinitionFile>
150 <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta -->
151 <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
153 <ProjectUrl>https://dot.net</ProjectUrl>
155 <!-- Central place to set the versions of all nuget packages produced in the repo -->
156 <PackageVersion Condition="'$(PackageVersion)' == ''">1.2.0</PackageVersion>
158 <!-- Set the boolean below to true to generate packages with stabilized versions -->
159 <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
160 <StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
162 <!-- On Windows, MSbuild still runs against Desktop FX while it runs on .NET Core on non-Windows. this requires
163 pulling in different packaging dependencies.
165 <PackagingTaskDir Condition="'$(TargetsWindows)' == 'true'">$(ToolsDir)net45/</PackagingTaskDir>
166 <BuildNumberMajor Condition="'$(BuildNumberMajor)' == ''">00001</BuildNumberMajor>
167 <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
168 <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
169 <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
170 <MinOSForArch>win7</MinOSForArch>
171 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
172 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
174 <!-- Define packaging attributes for cross target components -->
175 <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
176 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
177 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder>
179 <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath>
180 <SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
183 <!-- Add required legal files to packages -->
184 <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
185 <File Condition="Exists('$(PackageLicenseFile)')"
186 Include="$(PackageLicenseFile)" >
187 <SkipPackageFileCheck>true</SkipPackageFileCheck>
189 <File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
190 Include="$(PackageThirdPartyNoticesFile)" >
191 <SkipPackageFileCheck>true</SkipPackageFileCheck>