简体   繁体   English

Visual Studio 无法打开或创建项目

[英]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.

相关问题 无法在Visual Studio 2017中打开项目 - Cannot open the project in Visual Studio 2017 Visual Studio Community 2019 创建项目但无法打开它创建的项目? - Visual Studio Community 2019 creates a project but cannot open the project it created? 无法从另一台PC在Visual Studio 2012中打开项目 - Cannot open project in visual studio 2012 from another pc 无法在Visual Studio中打开数据库 - Cannot Open Database in Visual Studio 由于缺少XAML文件,Visual Studio 2012无法打开XAML项目 - Visual Studio 2012 cannot open XAML project due to missing XAML files 如何在没有迁移的情况下在Visual Studio中打开项目? - How to open project in Visual Studio without migration? 在Visual Studio 2012上无法打开项目 - Project doesn't open on Visual Studio 2012 Visual Studio 无法打开 cshtml 文件 - Visual Studio Cannot open cshtml Files 即使成功构建项目,应用程序也无法与MDF文件建立连接[Visual Studio 2010 C#] - The application cannot make a connection with MDF file even building the project successfully [Visual Studio 2010 C#] Visual Studio 2015无法调试xamarin项目 - Visual studio 2015 cannot debug xamarin project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM