gpt4 book ai didi

c# - 如何在 Team Foundation Server 2015 中启用 C# 7 构建?

转载 作者:太空狗 更新时间:2023-10-29 23:20:25 26 4
gpt4 key购买 nike

我们在本地安装了 Team Foundation Server (TFS) 2015。我们想使用 Visual Studio 2017 来利用最新的 C# 语言功能。我们尚未准备好升级到 TFS 2017。要在 TFS 2015 中构建最新的 C# 语言功能需要执行哪些步骤?

最佳答案

我没有完全按照这些步骤操作,但根据我所学到的,我认为它们会奏效:

  1. 安装 Visual Studio 2017 Build Tools在 XAML 生成配置服务器上
  2. 将这些行添加到 TFSBuildServiceHost.exe.config 文件中:
  <configSections>
<section name="msbuildToolsets" type="Microsoft.Build.Evaluation.ToolsetConfigurationSection, Microsoft.Build.Utilities.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" requirePermission="false" />
</configSections>
<msbuildToolsets>
<toolset toolsVersion="15.0">
<property name="MSBuildToolsPath" value="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin" />
</toolset>
<toolset toolsVersion="latest">
<property name="MSBuildToolsPath" value="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin" />
</toolset>
</msbuildToolsets>

C:\Program Files\Microsoft Team Foundation Server 14.0\Tools\TFSBuildServiceHost.exe.config

(I never would have figure that out without this post. Thank you jonesy2488!)

  1. 重新启动 XAML 构建配置服务。
  2. 更改 XAML 构建过程模板以包含 ToolVersion="15.0"参数:
<mtba:RunMSBuild DisplayName="Run MSBuild" OutputLocation="[OutputLocation]" CleanBuild="[CleanBuild]" CommandLineArguments="[String.Format(&quot;/p:SkipInvalidConfigurations=true {0}&quot;, AdvancedBuildSettings.GetValue(Of String)(&quot;MSBuildArguments&quot;, String.Empty))]" ConfigurationsToBuild="[ConfigurationsToBuild]" ProjectsToBuild="[ProjectsToBuild]" ToolVersion="15.0" ToolPlatform="[AdvancedBuildSettings.GetValue(Of String)(&quot;MSBuildPlatform&quot;, &quot;Auto&quot;)]" RunCodeAnalysis="[AdvancedBuildSettings.GetValue(Of String)(&quot;RunCodeAnalysis&quot;, &quot;AsConfigured&quot;)]" />

关于c# - 如何在 Team Foundation Server 2015 中启用 C# 7 构建?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44486341/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com