【发布时间】:2011-03-17 04:48:02
【问题描述】:
我在迁移到 .net 4.0 时遇到问题,在尝试构建时出现以下错误。
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1917,9):
error MSB3086: Task could not find "LC.exe" using the SdkToolsPath "" or the
registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A".
Make sure the SdkToolsPath is set and the tool exists in the correct processor
specific location under the SdkToolsPath and that the Microsoft Windows SDK is
installed
External Program Failed: C:\windows\microsoft.net\framework\v4.0.30319\MSBuild.exe
(return code was 1)
机器上安装了最新版本的microsoft windows sdk,但版本是v7.1。为了解决这个问题,我将以下注册表项放在
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\InstallationFolder
to C:\Program Files\Microsoft SDKs\Windows\v7.1\.
这很有效,但是我觉得将 7.0A 注册表项指向 7.1 安装有点脏。有没有人有更好的解决这个问题的方法?
【问题讨论】:
-
我刚刚遇到了同样的问题。网上有很多变通方法,但我也找不到修复方法。在安装 VS 2010 后安装 Windows SDK 7.1 版时,似乎没有更新相应的路径以指向新目录。
标签: c#