[英]Visual Studio cannot open or make project
When I open or create a project in Visual Studio C# 2010 Express I get this error:当我在 Visual Studio C# 2010 Express 中打开或创建项目时,出现此错误:
Cannot evaluate the property expression "$([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\'))" found at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0@VCTargetsPath".
无法评估在“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft \MSBuild\ToolsVersions\12.0@VCTargetsPath”。 Invalid static method invocation syntax: "[MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\')".
无效的 static 方法调用语法:“[MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\')”。 Method '[MSBuild]]::ValueOrDefault' not found.
未找到方法“[MSBuild]]::ValueOrDefault”。 Static method invocations should be of the form: §([FullTypeName]::Method()), eg $([System.IO.Path]::Combine(
a
,b
)).Static 方法调用应采用以下形式:§([FullTypeName]::Method()),例如 $([System.IO.Path]::Combine(
a
,b
))。
I hope someone can solve this problem.我希望有人能解决这个问题。 I tried re-installing it but it doesn't work.
我尝试重新安装它,但它不起作用。 I think it is something with the registry.
我认为这与注册表有关。
I had the same issue when I had previously installed VS2013 and then uninstalled. 以前安装VS2013然后卸载时,我遇到了同样的问题。 This happens because VS2013 uninstaller forgets one of its registry keys, which causes this error when you start to work with VS2010 again.
发生这种情况是因为VS2013卸载程序忘记了其注册表项之一,当您再次开始使用VS2010时会导致此错误。
Delete if there is a key with 12.0 in this location. 如果此位置有一个密钥为12.0的密钥,请删除。
HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\MSBuild\\ToolsVersions
Hopefully VS2010 will work again. 希望VS2010能够再次运行。
Fixed. 固定。 I removed vs express.
我删除了vs表达。 That solved the problem.
那解决了问题。
for me the project had created file which exceeded maximum character length path of OS.对我来说,该项目创建的文件超过了操作系统的最大字符长度路径。 problem solved by deleting those file
通过删除这些文件解决了问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.