Microsoft.Net.Compilers.props 2.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  2. <!-- The UsingTask, UseSharedCompilation, and ToolPath/Exe variables all interact to
  3. choose which compiler path to use and whether or not to use the compiler server.
  4. If UsingTask and UseSharedCompilation are set then the compiler server next to the
  5. task will be used (i.e., the one in this package).
  6. If UseSharedCompilation is false or ToolPath/Exe are set the compiler server will
  7. not be used and the compiler exe at the ToolPath, if set, will be executed, otherwise
  8. the executable in the MSBuild install path will be executed. -->
  9. <!-- Always use the local build task, even if we just shell out to an exe in case there are
  10. new properties in the local build task. -->
  11. <UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Csc"
  12. AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll"
  13. Condition="'$(MSBuildToolsVersion)' == '14.0'" />
  14. <UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Vbc"
  15. AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll"
  16. Condition="'$(MSBuildToolsVersion)' == '14.0'" />
  17. <PropertyGroup>
  18. <!-- By default don't use the compiler server on VS 2015 and never use it
  19. otherwise (it is not yet supported on VS 2013 or below).-->
  20. <UseSharedCompilation Condition="'$(UseSharedCompilation)' == ''
  21. or '$(MSBuildToolsVersion)' != '14.0'">false</UseSharedCompilation>
  22. <CSharpCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath>
  23. <VisualBasicCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.VisualBasic.Core.targets</VisualBasicCoreTargetsPath>
  24. </PropertyGroup>
  25. <!-- If we're not using the compiler server, set ToolPath/Exe to direct to
  26. the exes in this package -->
  27. <PropertyGroup Condition="'$(UseSharedCompilation)' != 'true'">
  28. <CscToolPath>$(MSBuildThisFileDirectory)..\tools</CscToolPath>
  29. <CscToolExe>csc.exe</CscToolExe>
  30. <VbcToolPath>$(MSBuildThisFileDirectory)..\tools</VbcToolPath>
  31. <VbcToolExe>vbc.exe</VbcToolExe>
  32. </PropertyGroup>
  33. </Project>