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>
26 Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
27 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.
30 <RunningOnCore>false</RunningOnCore>
31 <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'Core'">true</RunningOnCore>
32 <BuildToolsTargetsDesktop>false</BuildToolsTargetsDesktop>
33 <BuildToolsTargetsDesktop Condition="'$(RunningOnCore)' != 'true'">true</BuildToolsTargetsDesktop>
34 <BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
37 <!-- Common properties -->
39 <!-- Set basic properties and normalize -->
40 <BuildArch>$(__BuildArch)</BuildArch>
41 <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
42 <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
44 <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
45 <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
46 <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
47 <BuildType Condition="'$(__BuildType)' == 'checked'">Checked</BuildType>
49 <BuildOS>$(__BuildOS)</BuildOS>
50 <BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>
52 <ProjectDir>$(__ProjectDir)\</ProjectDir>
53 <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>
55 <SourceDir>$(__SourceDir)\</SourceDir>
56 <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>
58 <!-- This name is used to create a GIT reposiitory URL https://github.com/dotnet/$(GitHubRepositoryName) used to find source code for debugging -->
59 <GitHubRepositoryName Condition="'$(GitHubRepositoryName)' == ''">coreclr</GitHubRepositoryName>
61 <PackagesDir>$(__PackagesDir)\</PackagesDir>
62 <PackagesDir Condition="'$(__PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
64 <RootBinDir>$(__RootBinDir)\</RootBinDir>
65 <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
67 <BinDir>$(__BinDir)\</BinDir>
68 <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
70 <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS).$(BuildArch).$(BuildType)</__IntermediatesDir>
71 <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>
73 <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
74 fails to write packages to it if the path contains the forward slash.
76 <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
77 <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
79 <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools\</ToolsDir>
80 <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli\</DotnetCliPath>
81 <OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost>
82 <BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
84 <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
85 <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
87 <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
88 <Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>
90 <!-- Default to portable build if not explicitly set -->
91 <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
96 <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
97 <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)$(BuildOS).$(BuildArch).$(BuildType)\$(MSBuildProjectName)</IntermediateOutputPath>
98 <OutputPath Condition="'$(OutputPath)' == ''">$(BinDir)</OutputPath>
101 <!-- Explicitly set BuildVersionFile before importing common. This is used by BuildVersion.targets. -->
102 <PropertyGroup Condition="'$(OfficialBuildId)' != ''">
103 <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
106 <!-- Import Build tools common props file where repo-independent properties are found -->
107 <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
109 <!-- Setup common target properties that we use to conditionally include sources -->
111 <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
112 <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
113 <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
114 <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
115 <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
117 <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
119 <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
120 <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
124 <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
125 <Import Project="$(ProjectDir)dependencies.props" />
127 <!-- Packaging properties -->
129 <LicenseUrl>https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT</LicenseUrl>
130 <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
131 <PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile>
132 <PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
133 <SyncInfoDirectory>$(BaseIntermediateOutputPath)</SyncInfoDirectory>
135 <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
136 <RuntimeIdGraphDefinitionVersion>1.0.2-beta-24224-02</RuntimeIdGraphDefinitionVersion>
137 <RuntimeIdGraphDefinitionFile>$(PackagesDir)/microsoft.netcore.platforms/$(RuntimeIdGraphDefinitionVersion)/runtime.json</RuntimeIdGraphDefinitionFile>
139 <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta -->
140 <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
142 <ProjectUrl>https://dot.net</ProjectUrl>
144 <!-- On Windows, MSbuild still runs against Desktop FX while it runs on .NET Core on non-Windows. this requires
145 pulling in different packaging dependencies.
147 <PackagingTaskDir Condition="'$(TargetsWindows)' == 'true'">$(ToolsDir)net46/</PackagingTaskDir>
148 <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
149 <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
150 <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
151 <MinOSForArch>win7</MinOSForArch>
152 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
153 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
154 <!-- This property must be set to disable local package installation -->
155 <SkipInstallLocallyBuiltPackages>true</SkipInstallLocallyBuiltPackages>
157 <!-- Define packaging attributes for cross target components -->
158 <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
159 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
160 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder>
162 <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath>
163 <SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
164 <PackageIndexFile>$(MSBuildThisFileDirectory)/src/.nuget/packageIndex.json</PackageIndexFile>
166 <!-- coreclr doesn't currently use the index so don't force it to be in sync -->
167 <SkipIndexCheck>true</SkipIndexCheck>
170 <!-- Add required legal files to packages -->
171 <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
172 <File Condition="Exists('$(PackageLicenseFile)')"
173 Include="$(PackageLicenseFile)" >
174 <SkipPackageFileCheck>true</SkipPackageFileCheck>
176 <File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
177 Include="$(PackageThirdPartyNoticesFile)" >
178 <SkipPackageFileCheck>true</SkipPackageFileCheck>
180 <PackageIndex Include="$(PackageIndexFile)" />
183 <!-- Use Roslyn Compilers to build -->
184 <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" />
185 <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)')" />