Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Microsoft.Net.Compilers.props 2.7 KiB

pirms 4 gadiem
1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
  3. <Project ToolsVersion="14.0" DefaultTargets="Build" InitialTargets="ValidateMSBuildToolsVersion" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  4. <!-- The UsingTask, UseSharedCompilation, and ToolPath/Exe variables all interact to
  5. choose which compiler path to use and whether or not to use the compiler server.
  6. If UsingTask and UseSharedCompilation are set then the compiler server next to the
  7. task will be used (i.e., the one in this package).
  8. If UseSharedCompilation is false or ToolPath/Exe are set the compiler server will
  9. not be used and the compiler exe at the ToolPath, if set, will be executed, otherwise
  10. the executable in the MSBuild install path will be executed. -->
  11. <Target Name="ValidateMSBuildToolsVersion" Condition="'$(BuildingProject)' == 'true'">
  12. <Error Text="Microsoft.Net.Compilers is only supported on MSBuild v14.0 and above"
  13. Condition="'$(MSBuildToolsVersion)' == '2.0' OR
  14. '$(MSBuildToolsVersion)' == '3.5' OR
  15. '$(MSBuildToolsVersion)' == '4.0' OR
  16. '$(MSBuildToolsVersion)' == '12.0'" />
  17. </Target>
  18. <!-- Always use the local build task, even if we just shell out to an exe in case there are
  19. new properties in the local build task. -->
  20. <UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Csc"
  21. AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" />
  22. <UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Vbc"
  23. AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" />
  24. <PropertyGroup>
  25. <!-- By default don't use the compiler server in Visual Studio. -->
  26. <UseSharedCompilation Condition="'$(UseSharedCompilation)' == ''">false</UseSharedCompilation>
  27. <CSharpCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath>
  28. <VisualBasicCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.VisualBasic.Core.targets</VisualBasicCoreTargetsPath>
  29. </PropertyGroup>
  30. <!-- If we're not using the compiler server, set ToolPath/Exe to direct to
  31. the exes in this package -->
  32. <PropertyGroup Condition="'$(UseSharedCompilation)' != 'true'">
  33. <CscToolPath>$(MSBuildThisFileDirectory)..\tools</CscToolPath>
  34. <CscToolExe>csc.exe</CscToolExe>
  35. <VbcToolPath>$(MSBuildThisFileDirectory)..\tools</VbcToolPath>
  36. <VbcToolExe>vbc.exe</VbcToolExe>
  37. </PropertyGroup>
  38. </Project>