1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
8 <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
9 <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
12 <!-- Version numbers for both managed & native binaries -->
14 <MajorVersion>4</MajorVersion>
15 <MinorVersion>6</MinorVersion>
18 <!-- Build Tools Versions -->
20 <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
21 <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
25 Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
26 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.
29 <BuildToolsTargets45>true</BuildToolsTargets45>
32 <!-- Common properties -->
34 <!-- Set basic properties and normalize -->
35 <BuildArch>$(__BuildArch)</BuildArch>
36 <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
37 <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
39 <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
40 <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
41 <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
42 <BuildType Condition="'$(__BuildType)' == 'checked'">Checked</BuildType>
44 <BuildOS>$(__BuildOS)</BuildOS>
45 <BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>
47 <ProjectDir>$(__ProjectDir)\</ProjectDir>
48 <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>
50 <SourceDir>$(__SourceDir)\</SourceDir>
51 <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>
53 <PackagesDir>$(__PackagesDir)\</PackagesDir>
54 <PackagesDir Condition="'$(__PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
56 <RootBinDir>$(__RootBinDir)\</RootBinDir>
57 <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
59 <BinDir>$(__BinDir)\</BinDir>
60 <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
62 <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS).$(BuildArch).$(BuildType)</__IntermediatesDir>
63 <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>
65 <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
66 fails to write packages to it if the path contains the forward slash.
68 <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
69 <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
71 <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
72 <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
73 <OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost>
74 <BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
76 <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
77 <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
79 <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
80 <Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>
85 <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
86 <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)$(BuildOS).$(BuildArch).$(BuildType)\$(MSBuildProjectName)</IntermediateOutputPath>
87 <OutputPath Condition="'$(OutputPath)' == ''">$(BinDir)</OutputPath>
90 <Import Condition="Exists('$(ToolsDir)BuildVersion.targets')" Project="$(ToolsDir)BuildVersion.targets" />
92 <!-- Import Build tools common props file where repo-independent properties are found -->
93 <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
96 <!-- Common nuget properties -->
98 <NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(PackagesDir)NuGet.exe</NuGetToolPath>
99 <NuGetConfigFile Condition="'$(NuGetConfigFile)'==''">$(SourceDir)NuGet.Config</NuGetConfigFile>
100 <NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>
102 <NugetRestoreCommand>"$(NuGetToolPath)"</NugetRestoreCommand>
103 <NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
104 <!-- Trim off the last slash so that nuget doesn't get confused and say there are illegal characters on
106 <NugetRestoreCommand>$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('\\'))"</NugetRestoreCommand>
107 <NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
108 <NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
109 <NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
113 <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
114 <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>
116 <DnuRestoreCommand>$(DnuRestoreCommand) "$(DotnetToolCommand)"</DnuRestoreCommand>
117 <DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
118 <DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand>
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 <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
126 <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
127 <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
129 <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
131 <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
132 <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
136 <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
137 <Import Project="$(ProjectDir)dependencies.props" />
139 <!-- Packaging properties -->
141 <PreReleaseLabel>preview1</PreReleaseLabel>
142 <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
143 <PackageLicenseFile>$(SourceDir).nuget/dotnet_library_license.txt</PackageLicenseFile>
144 <PackageThirdPartyNoticesFile>$(SourceDir).nuget/ThirdPartyNotices.txt</PackageThirdPartyNoticesFile>
146 <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
147 <RuntimeIdGraphDefinitionFile>$(PackagesDir)/Microsoft.NETCore.Platforms/1.0.2-beta-24224-02/runtime.json</RuntimeIdGraphDefinitionFile>
149 <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta -->
150 <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
152 <ProjectUrl>https://dot.net</ProjectUrl>
154 <!-- Central place to set the versions of all nuget packages produced in the repo -->
155 <PackageVersion Condition="'$(PackageVersion)' == ''">2.0.0</PackageVersion>
157 <!-- Set the boolean below to true to generate packages with stabilized versions -->
158 <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
159 <StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
161 <!-- On Windows, MSbuild still runs against Desktop FX while it runs on .NET Core on non-Windows. this requires
162 pulling in different packaging dependencies.
164 <PackagingTaskDir Condition="'$(TargetsWindows)' == 'true'">$(ToolsDir)net46/</PackagingTaskDir>
165 <BuildNumberMajor Condition="'$(BuildNumberMajor)' == ''">00001</BuildNumberMajor>
166 <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
167 <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
168 <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
169 <MinOSForArch>win7</MinOSForArch>
170 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
171 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
172 <!-- This property must be set to disable local package installation -->
173 <SkipInstallLocallyBuiltPackages>true</SkipInstallLocallyBuiltPackages>
175 <!-- Define packaging attributes for cross target components -->
176 <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
177 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
178 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder>
180 <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath>
181 <SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
182 <PackageIndexFile>$(MSBuildThisFileDirectory)/src/.nuget/packageIndex.json</PackageIndexFile>
184 <!-- coreclr doesn't currently use the index so don't force it to be in sync -->
185 <SkipIndexCheck>true</SkipIndexCheck>
188 <!-- Add required legal files to packages -->
189 <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
190 <File Condition="Exists('$(PackageLicenseFile)')"
191 Include="$(PackageLicenseFile)" >
192 <SkipPackageFileCheck>true</SkipPackageFileCheck>
194 <File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
195 Include="$(PackageThirdPartyNoticesFile)" >
196 <SkipPackageFileCheck>true</SkipPackageFileCheck>
198 <PackageIndex Include="$(PackageIndexFile)" />
201 <!-- Use Roslyn Compilers to build -->
202 <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" />
203 <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)')" />