Visual Studio 2017:项目已过期并出现错误 (0x80004005)

Visual Studio 2017: Project is out of date with error (0x80004005)

Visual Studio 2017 Professional on Windows 10,针对 .NET 4.5.2 的 47 个项目的解决方案。

VS 总是在我的解决方案中重建许多项目,即使这些项目没有变化并且是最新的。我这条 "very informative" 消息:

1>Project 'A' is not up to date. Error (0x80004005). 
1>------ Build started: Project: A, Configuration: Debug Any CPU ------
2>Project 'B' is not up to date. Error (0x80004005). 
2>------ Build started: Project: B, Configuration: Debug Any CPU ------

我在解决方案中看不到任何 .suo 文件。解决方案中的某些项目是 C#,其他项目是 VB.NET。然而,当我输入这个时,我注意到只有 C# 项目抛出 0x80004005 错误并强制重建。

请帮我解决这个奇怪的问题。

谢谢。

我发现以下link可能描述了抛出错误的原因和相应的解决方案。

You may receive error code 0x80004005 or other error codes when you try to start a Windows XP-based computer

您可以从 link 中尝试。

找到了!

在 .csproj 文件中,有这样的内容:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" **ToolsVersion="12.0"**>

但是如果你把它改成这样:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" **ToolsVersion="Current"**>

[ ** 突出显示我的]

谢谢!

我在加载时遇到了同样的错误 0x80004005。 所需要的只是 运行 构建 -> 干净的代码解决方案