зеркало из https://github.com/dotnet/corefx-tools.git
247 строки
13 KiB
XML
247 строки
13 KiB
XML
<Project ToolsVersion="12.0" DefaultTargets="Build" InitialTargets="CheckRoslyn" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<Import Condition="Exists('..\dir.props')" Project="..\dir.props" />
|
|
|
|
<!--
|
|
$(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
|
|
-->
|
|
<PropertyGroup>
|
|
<OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
|
|
</PropertyGroup>
|
|
|
|
<!-- Build Tools Versions -->
|
|
<PropertyGroup>
|
|
<BuildToolsVersion>1.0.25-prerelease-00094</BuildToolsVersion>
|
|
<DnxVersion>1.0.0-beta7</DnxVersion>
|
|
<DnxPackageName Condition="'$(DnxPackageName)' == '' and '$(OsEnvironment)'!='Unix'">dnx-coreclr-win-x86.$(DnxVersion)</DnxPackageName>
|
|
<DnxPackageName Condition="'$(DnxPackageName)' == '' and '$(OsEnvironment)'=='Unix'">dnx-mono.$(DnxVersion)</DnxPackageName>
|
|
<RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
|
|
<RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<AssemblyMetadata Include=".NETFrameworkAssembly">
|
|
<Value></Value>
|
|
</AssemblyMetadata>
|
|
<AssemblyMetadata Include="Serviceable">
|
|
<Value>True</Value>
|
|
</AssemblyMetadata>
|
|
</ItemGroup>
|
|
|
|
<!-- Common repo directories -->
|
|
<PropertyGroup>
|
|
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
|
|
<SourceDir>$(ProjectDir)src/</SourceDir>
|
|
|
|
<!-- Output directories -->
|
|
<BinDir Condition="'$(BinDir)'==''">$(ProjectDir)bin/</BinDir>
|
|
<ObjDir Condition="'$(ObjDir)'==''">$(BinDir)obj/</ObjDir>
|
|
<TestWorkingDir Condition="'$(TestWorkingDir)'==''">$(BinDir)tests/</TestWorkingDir>
|
|
<PackagesOutDir Condition="'$(PackagesOutDir)'==''">$(BinDir)packages/</PackagesOutDir>
|
|
|
|
<!-- Input Directories -->
|
|
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages/</PackagesDir>
|
|
<ToolsDir Condition="'$(ToolsDir)'==''">$(PackagesDir)Microsoft.DotNet.BuildTools.$(BuildToolsVersion)/lib/</ToolsDir>
|
|
</PropertyGroup>
|
|
|
|
<!-- list of nuget package sources passed to nuget.exe -->
|
|
<ItemGroup>
|
|
<NuGetSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-buildtools" />
|
|
<NuGetSourceList Include="https:%2F%2Fwww.nuget.org/api/v2" />
|
|
</ItemGroup>
|
|
|
|
<!-- Common nuget properties -->
|
|
<PropertyGroup>
|
|
<NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(PackagesDir)NuGet.exe</NuGetToolPath>
|
|
<NuGetPackageSource>@(NuGetSourceList -> '-source %(Identity)', ' ')</NuGetPackageSource>
|
|
<NuGetConfigCommandLine>$(NuGetPackageSource)</NuGetConfigCommandLine>
|
|
|
|
<NugetRestoreCommand>"$(NuGetToolPath)"</NugetRestoreCommand>
|
|
<NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
|
|
<!-- NuGet.exe doesn't like trailing slashes in the output directory argument -->
|
|
<NugetRestoreCommand>$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('/\'.ToCharArray()))"</NugetRestoreCommand>
|
|
<NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
|
|
<NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
|
|
<NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
|
|
</PropertyGroup>
|
|
|
|
<!-- list of nuget package sources passed to dnu -->
|
|
<ItemGroup>
|
|
<!-- Need to escape double forward slash (%2F) or MSBuild will normalize to one slash on Unix. -->
|
|
<DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-core/" />
|
|
<DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-coreclr/" />
|
|
<DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-corefx/" />
|
|
<DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-corefxtestdata/" />
|
|
<DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-buildtools/" />
|
|
<DnuSourceList Include="https:%2F%2Fwww.nuget.org/api/v2/" />
|
|
</ItemGroup>
|
|
|
|
<!-- list of directories to perform batch restore -->
|
|
<ItemGroup>
|
|
<DnuRestoreDir Include=""$(MSBuildProjectDirectory)\src"" />
|
|
<DnuRestoreDir Include=""$(ToolsDir)"" />
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup>
|
|
<DnxPackageDir Condition="'$(DnxPackageDir)'==''">$(PackagesDir)/$(DnxPackageName)/</DnxPackageDir>
|
|
<DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OsEnvironment)'!='Unix'">$(DnxPackageDir)\bin\dnu.cmd</DnuToolPath>
|
|
<DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OsEnvironment)'=='Unix'">$(DnxPackageDir)/bin/dnu</DnuToolPath>
|
|
|
|
<DnuRestoreSource>@(DnuSourceList -> '--source %(Identity)', ' ')</DnuRestoreSource>
|
|
<DnuRestoreDirs>@(DnuRestoreDir -> '%(Identity)', ' ')</DnuRestoreDirs>
|
|
|
|
<DnuRestoreCommand>"$(DnuToolPath)"</DnuRestoreCommand>
|
|
<DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
|
|
<DnuRestoreCommand Condition="'$(ParallelRestore)'=='true'">$(DnuRestoreCommand) --parallel</DnuRestoreCommand>
|
|
<DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('/\'.ToCharArray()))" $(DnuRestoreSource)</DnuRestoreCommand>
|
|
<DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(BuildAllProjects)'=='true'">
|
|
<!-- When we do a traversal build we get all packages up front, don't restore them again -->
|
|
<RestorePackages>false</RestorePackages>
|
|
</PropertyGroup>
|
|
|
|
<!--
|
|
Set up Roslyn predefines
|
|
-->
|
|
<PropertyGroup>
|
|
<RoslynPackageDir>$(PackagesDir)/$(RoslynPackageName).$(RoslynVersion)/</RoslynPackageDir>
|
|
<RoslynPropsFile>$(RoslynPackageDir)build/Microsoft.Net.ToolsetCompilers.props</RoslynPropsFile>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition="'$(OsEnvironment)'=='Unix' and '$(UseRoslynCompiler)'=='true'">
|
|
<!--
|
|
PDB support isn't implemented yet. https://github.com/dotnet/roslyn/issues/2449
|
|
Note that both DebugSymbols and DebugType need set or project references will assume they need to copy pdbs and fail.
|
|
-->
|
|
<DebugSymbols>false</DebugSymbols>
|
|
<DebugType>none</DebugType>
|
|
<!--
|
|
Delay signing with the ECMA key currently doesn't work.
|
|
https://github.com/dotnet/roslyn/issues/2444
|
|
-->
|
|
<UseECMAKey>false</UseECMAKey>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(OsEnvironment)'=='Unix'">
|
|
<!--
|
|
Mono currently doesn't include VB targets for portable, notably /lib/mono/xbuild/Microsoft/Portable/v4.5/Microsoft.Portable.VisualBasic.targets.
|
|
Fixed in https://github.com/mono/mono/pull/1726.
|
|
-->
|
|
<IncludeVbProjects>false</IncludeVbProjects>
|
|
<!--
|
|
Building packages fails for two reasons.
|
|
First, nuget doesn't like the paths in the nuspec having backslashes as directory separators.
|
|
Second, we aren't yet building pdbs, which the nuspecs specify.
|
|
-->
|
|
<SkipBuildPackages>true</SkipBuildPackages>
|
|
</PropertyGroup>
|
|
|
|
<!--
|
|
Projects that have no OS-specific implementations just use Debug and Release for $(Configuration).
|
|
Projects that do have OS-specific implementations use OS_Debug and OS_Release, for all OS's we support even
|
|
if the code is the same between some OS's (so if you have some project that just calls POSIX APIs, we still have
|
|
OSX_[Debug|Release] and Linux_[Debug|Release] configurations. We do this so that we place all the output under
|
|
a single binary folder and can have a similar experience between the command line and Visual Studio.
|
|
|
|
Since now have multiple *Debug and *Release configurations, ConfigurationGroup is set to Debug for any of the
|
|
debug configurations, and to Release for any of the release configurations.
|
|
-->
|
|
|
|
<!-- Set default Configuration and Platform -->
|
|
<PropertyGroup>
|
|
<Platform Condition="'$(Platform)'==''">AnyCPU</Platform>
|
|
|
|
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
|
|
<ConfigurationGroup Condition="$(Configuration.EndsWith('Debug'))">Debug</ConfigurationGroup>
|
|
<ConfigurationGroup Condition="$(Configuration.EndsWith('Release'))">Release</ConfigurationGroup>
|
|
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">$(Configuration)</ConfigurationGroup>
|
|
|
|
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Windows'))">Windows_NT</OSGroup>
|
|
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Linux'))">Linux</OSGroup>
|
|
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('OSX'))">OSX</OSGroup>
|
|
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('FreeBSD'))">FreeBSD</OSGroup>
|
|
<OSGroup Condition="'$(OSGroup)'==''">Windows_NT</OSGroup>
|
|
</PropertyGroup>
|
|
|
|
<!-- Set up Default symbol and optimization for Configuration -->
|
|
<PropertyGroup Condition="'$(ConfigurationGroup)' == 'Debug'">
|
|
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
|
|
<Optimize Condition="'$(Optimize)' == ''">false</Optimize>
|
|
<DebugType Condition="'$(DebugType)' == ''">full</DebugType>
|
|
<DefineConstants>$(DefineConstants),DEBUG,TRACE</DefineConstants>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition="'$(ConfigurationGroup)' == 'Release'">
|
|
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
|
|
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
|
|
<DebugType Condition="'$(DebugType)' == ''">pdbonly</DebugType>
|
|
<DefineConstants>$(DefineConstants),TRACE</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<!-- Disable some standard properties for building our projects -->
|
|
<PropertyGroup>
|
|
<NoStdLib>true</NoStdLib>
|
|
<NoExplicitReferenceToStdLib>true</NoExplicitReferenceToStdLib>
|
|
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
|
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
|
</PropertyGroup>
|
|
|
|
<!-- Set up handling of build warnings -->
|
|
<PropertyGroup>
|
|
<WarningLevel>4</WarningLevel>
|
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
</PropertyGroup>
|
|
|
|
<!-- Set up some common paths -->
|
|
<PropertyGroup>
|
|
<CommonPath>$(SourceDir)Common</CommonPath>
|
|
</PropertyGroup>
|
|
|
|
<!-- Set up the default output and intermediate paths -->
|
|
<PropertyGroup>
|
|
<OSPlatformConfig>$(OSGroup).$(Platform).$(ConfigurationGroup)</OSPlatformConfig>
|
|
|
|
<BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath>
|
|
<OutputPath Condition="'$(OutputPath)'==''">$(BaseOutputPath)$(OSPlatformConfig)\$(MSBuildProjectName)\</OutputPath>
|
|
|
|
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''">$(ObjDir)</BaseIntermediateOutputPath>
|
|
<IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(BaseIntermediateOutputPath)$(OSPlatformConfig)\</IntermediateOutputRootPath>
|
|
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(IntermediateOutputRootPath)$(MSBuildProjectName)\</IntermediateOutputPath>
|
|
|
|
<TestPath Condition="'$(TestPath)'==''">$(TestWorkingDir)$(OSPlatformConfig)\$(MSBuildProjectName)\</TestPath>
|
|
|
|
<PackagesBasePath Condition="'$(PackagesBasePath)'==''">$(BinDir)$(OSPlatformConfig)</PackagesBasePath>
|
|
</PropertyGroup>
|
|
|
|
<!-- Set up common target properties that we use to conditionally include sources -->
|
|
<PropertyGroup>
|
|
<TargetsWindows Condition="'$(OSGroup)' == 'Windows_NT'">true</TargetsWindows>
|
|
<TargetsLinux Condition="'$(OSGroup)' == 'Linux'">true</TargetsLinux>
|
|
<TargetsOSX Condition="'$(OSGroup)' == 'OSX'">true</TargetsOSX>
|
|
<TargetsFreeBSD Condition="'$(OSGroup)' == 'FreeBSD'">true</TargetsFreeBSD>
|
|
|
|
<TargetsUnix Condition="'$(TargetsLinux)' == 'true' or '$(TargetsOSX)' == 'true' or '$(TargetsFreeBSD)' == 'true'">true</TargetsUnix>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<!-- Work around known Dev14 bug - see
|
|
https://connect.microsoft.com/VisualStudio/feedback/details/1000796/connect-file-uap-props-not-found-cant-build-a-portable-lib-on-vs14
|
|
-->
|
|
<_WindowsKitBinPath>$(MSBuildProgramFiles32)\Windows Kits\8.1\bin\x86</_WindowsKitBinPath>
|
|
<_WindowsPhoneKitBinPath>$(MSBuildProgramFiles32)\Windows Phone Kits\8.1\bin</_WindowsPhoneKitBinPath>
|
|
<MakePriExeFullPath>$(_WindowsKitBinPath)\makepri.exe</MakePriExeFullPath>
|
|
<MakeAppxExeFullPath>$(_WindowsKitBinPath)\makeappx.exe</MakeAppxExeFullPath>
|
|
<SignAppxPackageExeFullPath>$(_WindowsKitBinPath)\signtool.exe</SignAppxPackageExeFullPath>
|
|
<MakePriExtensionPath>$(_WindowsPhoneKitBinPath)\x86\MrmEnvironmentExtDl.dll</MakePriExtensionPath>
|
|
<MakePriExtensionPath_x64>$(_WindowsPhoneKitBinPath)\x64\MrmEnvironmentExtDl.dll</MakePriExtensionPath_x64>
|
|
</PropertyGroup>
|
|
|
|
<Import Project="$(RoslynPropsFile)"
|
|
Condition="'$(UseRoslynCompiler)'=='true' and Exists('$(RoslynPropsFile)')" />
|
|
|
|
<!-- Building the build.proj should restore successfully, so ignore in that case -->
|
|
<Target Name="CheckRoslyn" Condition="'$(UseRoslynCompiler)'=='true' and '$(MSBuildProjectFile)'!='build.proj'">
|
|
<Warning Condition="!Exists('$(RoslynPropsFile)')"
|
|
Text="The Roslyn targets do not exist- Roslyn will not be used for this build, but the package should be restored if you build again." />
|
|
</Target>
|
|
</Project>
|