gpt4 book ai didi

c# - Visual Studio 无法打开或创建项目

转载 作者:太空宇宙 更新时间:2023-11-03 19:06:17 24 4
gpt4 key购买 nike

当我在 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". Invalid static method invocation syntax: "[MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\')". Method '[MSBuild]]::ValueOrDefault' not found. Static method invocations should be of the form: §([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(a, b)).

Error message

希望有人能解决这个问题。我尝试重新安装它,但它不起作用。我认为这与注册表有关。

最佳答案

我之前安装VS2013然后卸载时遇到了同样的问题。发生这种情况是因为 VS2013 卸载程序忘记了其中一个注册表项,这会在您再次开始使用 VS2010 时导致此错误。

如果这个位置有12.0的key就删除。

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions

希望 VS2010 能再次工作。

关于c# - Visual Studio 无法打开或创建项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26978418/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com