【发布时间】:2014-12-14 01:35:03
【问题描述】:
我正在使用带有 asp.net 项目的 Visual Studio 2013。其中一个项目给出了以下错误。 为什么它在错误的路径中寻找 LC.exe?我的 Windows 8.1 SDK 已安装,并且我在
处有一个 lc.exeC:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
和一个 64 位版本,我在
有一个注册表项HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1A
我正在查看C:\Windows\Microsoft.NET\Framework\v4.0.30319 下的 Microsoft.Common.targets,并且此密钥存在:SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)"。然后查看了
C:\Program Files (x86)\MSBuild\12.0\Bin
而TargetFrameworkSDKToolsDirectory 定义在$SDK40ToolsPath。根据MSBuild /v:diag,
SDK40ToolsPath = C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
看起来不错。 .NET 4.0 中 VS 中的项目目标。
那么为什么它仍在查看错误的文件夹或注册表项?有趣的是,当我收到错误消息后重新构建项目时,项目构建正常。
Error 5
Task could not find "LC.exe" using the SdkToolsPath
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\"
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 exists in the correct processor
specific location under the SdkToolsPath and that the Microsoft Windows SDK is
installed
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 2428 5 SuperReports
【问题讨论】:
-
它寻找正确的 SDK,而不是正确的子目录。它存储在 v7.0A\bin 中。很难猜测它最终是如何粘合“NETFX 4.0 工具”的。这可能只是一个 MSBuild 错误,许可证编译器并没有得到太多使用,并且由于 SDK 8.x 造成的剧变留下了很多伤痕。最简单的破解方法是自己创建子目录并将 lc.exe 复制到其中。一定要检查一下对 lc.exe 的需求,在 web 项目中使用它很奇怪。
-
那行得通。你可以让它成为一个答案。
-
我仍然认为它在错误消息中声称它正在查看 v7.0A 很奇怪。
标签: visual-studio visual-studio-2013 msbuild