提交 59611a73 编写于 作者: J Jared Parsons

Enable bootstrap builds

This adds a new supported MSBuild property BootstrapBuild.  The value of
this must point to a directory containing a functional version of csc
and vbc.  When specified these executables will be used to build the
product instead of the versions provided in NuGet.

This provides us a very simple way of enabling bootstrap builds.
上级 672d599a
......@@ -7,7 +7,7 @@
*.sln.docstates
# Build results
[Bb]inaries/
[Dd]ebug/
[Rr]elease/
x64/
......
......@@ -58,17 +58,27 @@
<RoslynDiagnosticsPropsFilePath>$(NuGetPackagesPath)\Microsoft.Net.RoslynDiagnostics.1.0.0-rc2-20150313-01\build\Microsoft.Net.RoslynDiagnostics.props</RoslynDiagnosticsPropsFilePath>
<AdditionalFileItemNames>$(AdditionalFileItemNames);PublicAPI</AdditionalFileItemNames>
</PropertyGroup>
<ImportGroup Label="GlobalNuGets">
<!-- Import the props files from the toolset NuGet packages if we're not in a bootstrap build -->
<ImportGroup Label="GlobalNuGets" Condition="'$(BootstrapBuild)' == ''">
<Import Project="$(ToolsetCompilerPropsFilePath)"
Condition="Exists('$(ToolsetCompilerPropsFilePath)')" />
<Import Project="$(RoslynDiagnosticsPropsFilePath)"
Condition="Exists('$(RoslynDiagnosticsPropsFilePath)') And ('$(UseRoslynAnalyzers)' == 'true')" />
</ImportGroup>
<Target Name="EnsureGlobalNuGets">
<Target Name="EnsureGlobalNuGets" Condition="'$(BootstrapBuild)' == ''">
<Error Condition="!$(CscToolPath.Contains('$(ToolsetCompilerPackageName)'))"
Text="This project requires the $(ToolsetCompilerPackageName) NuGet package to build. Use NuGet Package Restore to download the required files (&quot;powershell .nuget\NuGetRestore.ps1&quot;). The missing file is &quot;$(ToolsetCompilerPropsFilePath)&quot;." />
</Target>
<PropertyGroup Condition="'$(BootstrapBuild)' != ''">
<CscToolPath>$(BootstrapBuild)</CscToolPath>
<CscToolExe>csc.exe</CscToolExe>
<VbcToolPath>$(BootstrapBuild)</VbcToolPath>
<VbcToolExe>vbc.exe</VbcToolExe>
</PropertyGroup>
<!-- Common project settings -->
<PropertyGroup>
<DeployToSamplesSubfolder Condition="'$(DeployToSamplesSubfolder)' == ''">false</DeployToSamplesSubfolder>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册