1 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
7 <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
10 <!-- Build Tools Versions -->
12 <BuildToolsVersion>1.0.25-prerelease-00079</BuildToolsVersion>
13 <BuildToolsCoreCLRVersion>1.0.3-prerelease</BuildToolsCoreCLRVersion>
14 <DnxVersion Condition="'$(OsEnvironment)'!='Unix'">1.0.0-beta5-12101</DnxVersion>
15 <DnxVersion Condition="'$(OsEnvironment)'=='Unix'">1.0.0-beta5-12101</DnxVersion>
16 <DnxPackageName Condition="'$(DnxPackageName)' == '' and '$(OsEnvironment)'!='Unix'">dnx-coreclr-win-x86.$(DnxVersion)</DnxPackageName>
17 <DnxPackageName Condition="'$(DnxPackageName)' == '' and '$(OsEnvironment)'=='Unix'">dnx-mono.$(DnxVersion)</DnxPackageName>
18 <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
19 <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
20 <BuildToolsCoreCLRPackageName>Microsoft.DotNet.BuildTools.CoreCLR</BuildToolsCoreCLRPackageName>
21 <BuildToolsCoreCLRLocation>$(ToolsDir)$(BuildToolsCoreCLRPackageName).$(BuildToolsCoreCLRVersion)</BuildToolsCoreCLRLocation>
24 <!-- Common properties -->
26 <!-- Set basic properties and normalize -->
28 <BuildArch>$(__BuildArch)</BuildArch>
29 <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
30 <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
32 <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
33 <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
34 <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
36 <BuildOS>$(__BuildOS)</BuildOS>
37 <BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>
39 <ProjectDir>$(__ProjectDir)\</ProjectDir>
40 <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>
42 <SourceDir>$(__SourceDir)\</SourceDir>
43 <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>
45 <PackagesDir>$(__PackagesDir)\</PackagesDir>
46 <PackagesDir Condition="'$(__PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
48 <RootBinDir>$(__RootBinDir)\</RootBinDir>
49 <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
51 <BinDir>$(__BinDir)\</BinDir>
52 <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
54 <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
55 fails to write packages to it if the path contains the forward slash.
57 <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
58 <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget</PackagesBinDir>
60 <ToolsDir Condition="'$(ToolsDir)'==''">$(PackagesDir)Microsoft.DotNet.BuildTools.$(BuildToolsVersion)/lib/</ToolsDir>
61 <!-- Directory for the CoreCLR tools (BCLRewriter, etc.) -->
62 <CoreCLRToolsDir>$(PackagesDir)Microsoft.DotNet.BuildTools.CoreCLR.$(BuildToolsCoreCLRVersion)/</CoreCLRToolsDir>
64 <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
65 <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
68 <!-- Common nuget properties -->
70 <NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(PackagesDir)NuGet.exe</NuGetToolPath>
71 <NuGetConfigFile Condition="'$(NuGetConfigFile)'==''">$(SourceDir)NuGet.Config</NuGetConfigFile>
72 <NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>
74 <NugetRestoreCommand>"$(NuGetToolPath)"</NugetRestoreCommand>
75 <NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
76 <!-- Trim off the last slash so that nuget doesn't get confused and say there are illegal characters on
78 <NugetRestoreCommand>$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('\\'))"</NugetRestoreCommand>
79 <NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
80 <NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
81 <NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
85 <DnxPackageDir Condition="'$(DnxPackageDir)'==''">$(PackagesDir)/$(DnxPackageName)/</DnxPackageDir>
86 <DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OsEnvironment)'!='Unix'">$(DnxPackageDir)\bin\dnu.cmd</DnuToolPath>
87 <DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OsEnvironment)'=='Unix'">$(DnxPackageDir)/bin/dnu</DnuToolPath>
89 <DnuRestoreCommand>"$(DnuToolPath)"</DnuRestoreCommand>
90 <DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
91 <DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand>
92 <DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand>
95 <!-- Common build tool properties -->
97 <BuildToolsCoreCLRPackageName>Microsoft.DotNet.BuildTools.CoreCLR</BuildToolsCoreCLRPackageName>
98 <BuildToolsCoreCLRVersion>1.0.2-prerelease</BuildToolsCoreCLRVersion>
99 <BuildToolsCoreCLRLocation>$(ToolsDir)$(BuildToolsCoreCLRPackageName).$(BuildToolsCoreCLRVersion)</BuildToolsCoreCLRLocation>
102 <!-- Setup Nuget properties -->
104 <NuSpecSrcs Include="$(SourceDir)\.nuget\Microsoft.DotNet.CoreCLR.nuspec" />
105 <NuSpecSrcs Condition="'$(Configuration)'=='Release'" Include="$(SourceDir)\.nuget\Microsoft.DotNet.CoreCLR.Development.nuspec" />
106 <NuSpecSrcs Condition="'$(Configuration)'=='Debug'" Include="$(SourceDir)\.nuget\Microsoft.DotNet.CoreCLR.Debug.Development.nuspec" />
109 <!-- Backslash appended, see note in dir.props about the PackagesBinDir property -->
110 <NuSpecs Include="$(PackagesBinDir)\Microsoft.DotNet.CoreCLR.nuspec" />
111 <NuSpecs Condition="'$(Configuration)'=='Release'" Include="$(PackagesBinDir)\Microsoft.DotNet.CoreCLR.Development.nuspec" />
112 <NuSpecs Condition="'$(Configuration)'=='Debug'" Include="$(PackagesBinDir)\Microsoft.DotNet.CoreCLR.Debug.Development.nuspec" />
116 Set up Roslyn predefines
119 <RoslynPackageDir>$(PackagesDir)/$(RoslynPackageName).$(RoslynVersion)/</RoslynPackageDir>
120 <RoslynPropsFile>$(RoslynPackageDir)build/Microsoft.Net.ToolsetCompilers.props</RoslynPropsFile>
123 <!-- Setup common target properties that we use to conditionally include sources -->
125 <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
126 <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
127 <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
128 <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
130 <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>