问题描述
尽管我的解决方案是在本地计算机上构建的,但是当我使用"Visual Studio(sln)"作为构建步骤的运行程序时,它会在TeamCity上引发此错误:
Although my solution is building on my local machine, it throws this error on TeamCity when I use "Visual Studio (sln)" as the runner for the build step:
[Microsoft.Build.Utilities.ToolLocationHelper] :: GetPlatformSDKDisplayName($(TargetPlatformIdentifier),$(TargetPlatformVersion)).方法未找到"Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKDisplayName".应该使用静态方法进行调用.格式:$([FullTypeName] :: Method()),例如$([System.IO.Path] :: Combine(a
,b
)).
[Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion))". Method 'Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKDisplayName' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(a
, b
)).
您知道我在TeamCity方面缺少什么吗?我需要更改MSBuild运行器吗?
Any idea what I'm missing on the TeamCity side ?Do I need to change MSBuild runner ?
推荐答案
我建议这样做是试图从注册表中找到SDK的路径,但找不到它.
I would suggest this is trying to find the path to the SDK from the Registry and it's unable to find it.
尝试在生成服务器上安装Visual Studio Community Edition,这应该可以解决您的问题
Try installing Visual Studio Community Edition on the build server and this should fix your issue
这篇关于TeamCity上的Microsoft.Build.Utilities.ToolLocationHelper错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!