使用MSBuild时,我遇到了以下错误。我收到的错误信息如下:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2769,5): error MSB3086: Task could not find "sgen.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8. 0A\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the tool exi sts in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed
目前为止,我已经完成了以下步骤:
1)从这里安装了Windows SDK v8。
2)我确认注册表键"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8. 0A\WinSDK-NetFx40Tools-x86"在注册表中存在。
3) 第2点中的注册表键指向路径“C:\Program Files\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools”,我已确认该路径存在,并且sgen.exe位于该目录中。
4) 我也进行了一些自己的研究,发现this SO post,但答案涉及在服务器上安装Visual Studio,这对我来说不是一个选择。然而,我想指出我有另一个具有完全相同设置的构建服务器,它可以正常工作,因此我的临时解决方法是在那台服务器上构建,然后将构建内容复制过来。
有人能够提供关于问题可能是什么的任何见解吗?