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 <!-- Set the kind of PDB to Portable and turn on SourceLink (fetching source from GitHub) -->
15 <DebugType Condition="'$(DebugType)' == ''">Portable</DebugType>
16 <UseSourceLink>true</UseSourceLink>
19 <!-- Version numbers for both managed & native binaries -->
21 <MajorVersion>4</MajorVersion>
22 <MinorVersion>6</MinorVersion>
25 <!-- Build Tools Versions -->
27 <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
28 <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
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 running 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 repository URL https://github.com/dotnet/$(GitHubRepositoryName) used to find source code for debugging -->
65 <GitHubRepositoryName Condition="'$(GitHubRepositoryName)' == ''">coreclr</GitHubRepositoryName>
67 <PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir>
68 <PackagesDir Condition="'$(PackagesDir)'=='' and '$(__PackagesDir)'!=''">$(__PackagesDir)\</PackagesDir>
69 <PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
71 <RootBinDir>$(__RootBinDir)\</RootBinDir>
72 <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
74 <BinDir>$(__BinDir)\</BinDir>
75 <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
77 <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS).$(BuildArch).$(BuildType)</__IntermediatesDir>
78 <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>
80 <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
81 fails to write packages to it if the path contains the forward slash.
83 <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
84 <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
86 <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools\</ToolsDir>
87 <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli\</DotnetCliPath>
88 <OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost>
89 <BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
91 <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
92 <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
94 <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
95 <Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>
97 <!-- Default to portable build if not explicitly set -->
98 <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
101 <!-- Output paths -->
103 <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
104 <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)$(BuildOS).$(BuildArch).$(BuildType)\$(MSBuildProjectName)</IntermediateOutputPath>
105 <OutputPath Condition="'$(OutputPath)' == ''">$(BinDir)</OutputPath>
108 <!-- Explicitly set BuildVersionFile before importing common. This is used by BuildVersion.targets. -->
109 <PropertyGroup Condition="'$(OfficialBuildId)' != ''">
110 <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
113 <!-- Import Build tools common props file where repo-independent properties are found -->
114 <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
116 <!-- Setup common target properties that we use to conditionally include sources -->
118 <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
119 <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
120 <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
121 <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
122 <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
124 <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
126 <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
127 <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
131 <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
132 <Import Project="$(ProjectDir)dependencies.props" />
134 <!-- Packaging properties -->
136 <LicenseUrl>https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT</LicenseUrl>
137 <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
138 <PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile>
139 <PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
140 <SyncInfoDirectory>$(BaseIntermediateOutputPath)</SyncInfoDirectory>
142 <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
143 <RuntimeIdGraphDefinitionVersion>1.0.2-beta-24224-02</RuntimeIdGraphDefinitionVersion>
144 <RuntimeIdGraphDefinitionFile>$(PackagesDir)/microsoft.netcore.platforms/$(RuntimeIdGraphDefinitionVersion)/runtime.json</RuntimeIdGraphDefinitionFile>
146 <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta -->
147 <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
149 <ProjectUrl>https://dot.net</ProjectUrl>
151 <!-- On Windows, MSbuild still runs against Desktop FX while it runs on .NET Core on non-Windows. this requires
152 pulling in different packaging dependencies.
154 <PackagingTaskDir Condition="'$(TargetsWindows)' == 'true'">$(ToolsDir)net46/</PackagingTaskDir>
155 <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
156 <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
157 <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
158 <MinOSForArch>win7</MinOSForArch>
159 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
160 <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
161 <!-- This property must be set to disable local package installation -->
162 <SkipInstallLocallyBuiltPackages>true</SkipInstallLocallyBuiltPackages>
164 <!-- Define packaging attributes for cross target components -->
165 <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
166 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
167 <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder>
169 <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath>
170 <SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
171 <PackageIndexFile>$(MSBuildThisFileDirectory)/src/.nuget/packageIndex.json</PackageIndexFile>
173 <!-- coreclr doesn't currently use the index so don't force it to be in sync -->
174 <SkipIndexCheck>true</SkipIndexCheck>
177 <!-- Add required legal files to packages -->
178 <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
179 <File Condition="Exists('$(PackageLicenseFile)')"
180 Include="$(PackageLicenseFile)" >
181 <SkipPackageFileCheck>true</SkipPackageFileCheck>
183 <File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
184 Include="$(PackageThirdPartyNoticesFile)" >
185 <SkipPackageFileCheck>true</SkipPackageFileCheck>
187 <PackageIndex Include="$(PackageIndexFile)" />
190 <!-- Use Roslyn Compilers to build -->
191 <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
192 <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />