1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Condition="Exists('..\dir.props')" Project="..\dir.props" />
6 $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
9 <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
10 <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
13 <!-- Version numbers for both managed & native binaries -->
15 <MajorVersion>4</MajorVersion>
16 <MinorVersion>6</MinorVersion>
19 <!-- Build Tools Versions -->
21 <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
22 <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
25 <!-- Profile-based optimization data package versions -->
27 <PgoDataPackageVersion>99.99.99-master-20170712-0121</PgoDataPackageVersion>
28 <!--<IbcDataPackageVersion></IbcDataPackageVersion>-->
32 Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
33 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.
36 <RunningOnCore>false</RunningOnCore>
37 <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'Core'">true</RunningOnCore>
38 <BuildToolsTargetsDesktop>false</BuildToolsTargetsDesktop>
39 <BuildToolsTargetsDesktop Condition="'$(RunningOnCore)' != 'true'">true</BuildToolsTargetsDesktop>
40 <BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
43 <!-- Common properties -->
45 <!-- Set basic properties and normalize -->
46 <BuildArch>$(__BuildArch)</BuildArch>
47 <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
48 <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
50 <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
51 <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
52 <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
53 <BuildType Condition="'$(__BuildType)' == 'checked'">Checked</BuildType>
55 <BuildOS>$(__BuildOS)</BuildOS>
56 <BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>
58 <ProjectDir>$(__ProjectDir)\</ProjectDir>
59 <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>
61 <SourceDir>$(__SourceDir)\</SourceDir>
62 <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>
64 <!-- This name is used to create a GIT reposiitory URL https://github.com/dotnet/$(GitHubRepositoryName) used to find source code for debugging -->
65 <GitHubRepositoryName Condition="'$(GitHubRepositoryName)' == ''">coreclr</GitHubRepositoryName>
67 <PackagesDir>$(__PackagesDir)\</PackagesDir>
68 <PackagesDir Condition="'$(__PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
70 <RootBinDir>$(__RootBinDir)\</RootBinDir>
71 <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
73 <BinDir>$(__BinDir)\</BinDir>
74 <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
76 <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS).$(BuildArch).$(BuildType)</__IntermediatesDir>
77 <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>
79 <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
80 fails to write packages to it if the path contains the forward slash.
82 <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
83 <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
85 <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools\</ToolsDir>
86 <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli\</DotnetCliPath>
87 <OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost>
88 <BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
90 <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
91 <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
93 <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
94 <Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>
96 <!-- Default to portable build if not explicitly set -->
97 <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
100 <!-- Output paths -->
102 <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
103 <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)$(BuildOS).$(BuildArch).$(BuildType)\$(MSBuildProjectName)</IntermediateOutputPath>
104 <OutputPath Condition="'$(OutputPath)' == ''">$(BinDir)</OutputPath>
107 <!-- Import Build tools common props file where repo-independent properties are found -->
108 <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
110 <!-- Setup common target properties that we use to conditionally include sources -->
112 <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
113 <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
114 <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
115 <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
116 <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
118 <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
120 <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
121 <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
125 <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
126 <Import Project="$(ProjectDir)dependencies.props" />
128 <!-- Packaging properties -->
130 <LicenseUrl>https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT</LicenseUrl>
131 <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
132 <PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile>
133 <PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
134 <SyncInfoDirectory>$(BaseIntermediateOutputPath)</SyncInfoDirectory>
136 <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
137 <RuntimeIdGraphDefinitionVersion>1.0.2-beta-24224-02</RuntimeIdGraphDefinitionVersion>
138 <RuntimeIdGraphDefinitionFile>$(PackagesDir)/microsoft.netcore.platforms/$(RuntimeIdGraphDefinitionVersion)/runtime.json</RuntimeIdGraphDefinitionFile>
140 <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta -->
141 <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
143 <ProjectUrl>https://dot.net</ProjectUrl>
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)net46/</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)' == ''">$(Platform)</PackagePlatform>
152 <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
153 <MinOSForArch>win7</MinOSForArch>
154 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
155 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
156 <!-- This property must be set to disable local package installation -->
157 <SkipInstallLocallyBuiltPackages>true</SkipInstallLocallyBuiltPackages>
159 <!-- Define packaging attributes for cross target components -->
160 <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
161 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
162 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder>
164 <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath>
165 <SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
166 <PackageIndexFile>$(MSBuildThisFileDirectory)/src/.nuget/packageIndex.json</PackageIndexFile>
168 <!-- coreclr doesn't currently use the index so don't force it to be in sync -->
169 <SkipIndexCheck>true</SkipIndexCheck>
172 <!-- Add required legal files to packages -->
173 <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
174 <File Condition="Exists('$(PackageLicenseFile)')"
175 Include="$(PackageLicenseFile)" >
176 <SkipPackageFileCheck>true</SkipPackageFileCheck>
178 <File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
179 Include="$(PackageThirdPartyNoticesFile)" >
180 <SkipPackageFileCheck>true</SkipPackageFileCheck>
182 <PackageIndex Include="$(PackageIndexFile)" />
185 <PropertyGroup Condition="'$(OfficialBuildId)' != ''">
186 <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
189 <!-- Use Roslyn Compilers to build -->
190 <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" />
191 <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)')" />