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-20170830-0123</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 <!-- Explicitly set BuildVersionFile before importing common. This is used by BuildVersion.targets. -->
108 <PropertyGroup Condition="'$(OfficialBuildId)' != ''">
109 <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
112 <!-- Import Build tools common props file where repo-independent properties are found -->
113 <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
115 <!-- Setup common target properties that we use to conditionally include sources -->
117 <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
118 <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
119 <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
120 <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
121 <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
123 <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
125 <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
126 <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
130 <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
131 <Import Project="$(ProjectDir)dependencies.props" />
133 <!-- Packaging properties -->
135 <LicenseUrl>https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT</LicenseUrl>
136 <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
137 <PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile>
138 <PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
139 <SyncInfoDirectory>$(BaseIntermediateOutputPath)</SyncInfoDirectory>
141 <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
142 <RuntimeIdGraphDefinitionVersion>1.0.2-beta-24224-02</RuntimeIdGraphDefinitionVersion>
143 <RuntimeIdGraphDefinitionFile>$(PackagesDir)/microsoft.netcore.platforms/$(RuntimeIdGraphDefinitionVersion)/runtime.json</RuntimeIdGraphDefinitionFile>
145 <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta -->
146 <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
148 <ProjectUrl>https://dot.net</ProjectUrl>
150 <!-- On Windows, MSbuild still runs against Desktop FX while it runs on .NET Core on non-Windows. this requires
151 pulling in different packaging dependencies.
153 <PackagingTaskDir Condition="'$(TargetsWindows)' == 'true'">$(ToolsDir)net46/</PackagingTaskDir>
154 <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
155 <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
156 <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
157 <MinOSForArch>win7</MinOSForArch>
158 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
159 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
160 <!-- This property must be set to disable local package installation -->
161 <SkipInstallLocallyBuiltPackages>true</SkipInstallLocallyBuiltPackages>
163 <!-- Define packaging attributes for cross target components -->
164 <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
165 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
166 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder>
168 <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath>
169 <SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
170 <PackageIndexFile>$(MSBuildThisFileDirectory)/src/.nuget/packageIndex.json</PackageIndexFile>
172 <!-- coreclr doesn't currently use the index so don't force it to be in sync -->
173 <SkipIndexCheck>true</SkipIndexCheck>
176 <!-- Add required legal files to packages -->
177 <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
178 <File Condition="Exists('$(PackageLicenseFile)')"
179 Include="$(PackageLicenseFile)" >
180 <SkipPackageFileCheck>true</SkipPackageFileCheck>
182 <File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
183 Include="$(PackageThirdPartyNoticesFile)" >
184 <SkipPackageFileCheck>true</SkipPackageFileCheck>
186 <PackageIndex Include="$(PackageIndexFile)" />
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)')" />