MSBuild不包含"VCTargetsPath"的值.财产 [英] MSBuild does not contain a value for the "VCTargetsPath" property

查看:646
本文介绍了MSBuild不包含"VCTargetsPath"的值.财产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近安装了Visual Studio 11开发人员预览版进行试用,现在我的VS 2010项目无法打开.相反,我收到以下错误消息:

I recently installed the Visual Studio 11 Developer Preview to try it out, and now my VS 2010 projects won't open. Instead, I get the following error message:

MSBuild不包含"VCTargetsPath"属性的值

MSBuild does not contain a value for the "VCTargetsPath" property

我发现有人举报了该问题,Microsoft的答复是:

I found someone that had reported the issue here on Connect, and the response from Microsoft was:

Microsoft于2011年2月2日下午5:25发布
阿夫申,

Posted by Microsoft on 12/2/2011 at 5:25 PM
Hi Afshin,

感谢您的反馈.您遇到的问题已在下一个公共发行版Visual Studio中得到解决.

Thanks for the feedback. The issue you ran into is fixed for the next public release Visual Studio.

吉姆·格里斯默
Visual C ++团队

Jim Griesmer
Visual C++ Team

太棒了.那么如何还原VCTargetsPath以便我的项目可以再次工作?

Fantastic. So how do I restore VCTargetsPath so my projects will work again?

"VCTargetsPath是在HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSBuild \ ToolsVersions \ 4.0中定义的工具集属性."

"VCTargetsPath is a toolset property that is defined in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0. "

我浏览到注册表中的VCTargetPath值,它具有以下值:

I browsed to the VCTargetPath value in the registry and it has the value:

$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\

不确定从这里要去哪里.有什么建议吗?

Not sure where to go from here. Any suggestions?

推荐答案

Gavin Pugh给出的解决方案可以解决该问题,尽管我没有尝试过,但这似乎是合理的.卸载VS11的Developer Preview后,我也遇到了这个问题.我想我知道那是什么真正的问题.

It seems reasonable that the solution Gavin Pugh gave would fix the problem, though I didn't try it. I too ran into this problem after uninstalling the Developer Preview of VS11. I think I know what is really wrong though.

Mladen Jankovic处在正确的轨道上.我的计算机上缺少以下两个(必要的)注册表项之一:

Mladen Jankovic was on the right track. One of the follow two (necessary) registry keys was missing on my machine:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0
    • 键名:VCTargetsPath
    • 类型:REG_SZ
    • 值:$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0
      • Key Name: VCTargetsPath
      • Type: REG_SZ
      • Value: $(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\
      • 键名:VCTargetsPath
      • 类型:REG_SZ
      • 值:$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\
      • Key Name: VCTargetsPath
      • Type: REG_SZ
      • Value: $(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\

      (您可以在Windows中通过键入 + R + regedit + Enter来编辑注册表项)

      (You can edit registry keys in Windows by typing +R+regedit+Enter)

      对我来说,我上面列出的第二个值是缺少的那个.添加完之后,我可以再次使用我的项目.

      For me, the second value I listed above was the one that was missing. After I added it, I was able to work with my project again.

      这篇关于MSBuild不包含"VCTargetsPath"的值.财产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆