3 <!-- This file contains build properties that apply to product
4 projects and test projects. It's imported by
5 tests/dir.common.props, and the global dir.props. -->
8 <CoreclrDir>$(MSBuildThisFileDirectory)</CoreclrDir>
9 <PackagesDir>$(CoreclrDir)/.packages/</PackagesDir>
12 <!-- Define NuGet properties for scenarios where they aren't set. From the command line.
13 Should match Nuget.config at root. -->
15 <NuGetPackageRoot>$(PackagesDir)</NuGetPackageRoot>
16 <RestorePackagesPath>$(PackagesDir)</RestorePackagesPath>
19 <!-- Set default Configuration and Platform -->
21 <BuildArch>$(__BuildArch)</BuildArch>
22 <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
23 <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
25 <BuildType>$(__BuildType)</BuildType>
26 <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
27 <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
28 <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
29 <BuildType Condition="'$(__BuildType)' == 'checked'">Checked</BuildType>
31 <BuildOS>$(__BuildOS)</BuildOS>
32 <BuildOS Condition="'$(__BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(Windows))' == 'true'">Windows_NT</BuildOS>
33 <BuildOS Condition="'$(__BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(Linux))' == 'true'">Linux</BuildOS>
34 <BuildOS Condition="'$(__BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(OSX))' == 'true'">OSX</BuildOS>
35 <!-- TODO: converge on one property for BuildOS and __BuildOS, and remove this extra line. -->
36 <__BuildOS>$(BuildOS)</__BuildOS>
38 <Configuration Condition="'$(Configuration)' == ''">$(BuildType)</Configuration>
39 <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
41 <PlatformConfigPathPart>$(BuildOS).$(BuildArch).$(BuildType)</PlatformConfigPathPart>
44 <!-- Common properties -->
47 <ProjectDir>$(__ProjectDir)\</ProjectDir>
48 <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>
50 <SourceDir>$(__SourceDir)\</SourceDir>
51 <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>
53 <RootBinDir>$(__RootBinDir)\</RootBinDir>
54 <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
56 <BinDir>$(__BinDir)\</BinDir>
57 <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(PlatformConfigPathPart)\</BinDir>
59 <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
60 fails to write packages to it if the path contains the forward slash.
62 <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
63 <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
67 <!-- Central place to set the versions of all nuget packages produced in the repo -->
68 <PackageVersion Condition="'$(PackageVersion)' == ''">3.1.3</PackageVersion>
69 <PreReleaseLabel>servicing</PreReleaseLabel>
72 <!-- Set up common target properties that we use to conditionally include sources -->
74 <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
75 <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
76 <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
77 <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
78 <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
80 <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
82 <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
83 <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
85 <!-- Folder for cross target components -->
86 <CrossTargetComponentFolder Condition="'$(BuildArch)' == 'arm64'">x64</CrossTargetComponentFolder>
87 <CrossTargetComponentFolder Condition="'$(BuildArch)' == 'arm' and '$(TargetsWindows)' == 'true'">x86</CrossTargetComponentFolder>
88 <CrossTargetComponentFolder Condition="'$(BuildArch)' == 'arm' and '$(TargetsLinux)' == 'true'">x64</CrossTargetComponentFolder>