VS2019 升级到 16.10 版本后,.NET 5 Projects with Packaging Projects 无法构建

问题描述

以下问题仅发生在还包含 Windows Application Packaging Project.NET 桌面项目上。

在我的 VS2019 变为 updated to version 16.10 之后,我所有还包含 Windows Application Packaging Project 的 .NET 5 项目都无法在 VS2019 中构建。 Clean SolutionRebuild Solution 操作均失败。在这两种情况下,我们都会收到以下错误

ResolvePackageDependencies 任务意外失败

当我尝试 dotnet clean 时,出现以下错误

C:\Program Files\dotnet\sdk\5.0.300\Microsoft\DesktopBridge\Microsoft.DesktopBridge.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\5.0.300\\Microsoft\DesktopBridge\\Microsoft.DesktopBridge.props" is correct,and that the file exists on disk.

并且我在我的 Windows 10 Pro - latest version 20H2 上验证了文件C:\Program Files\dotnet\sdk\5.0.300\Microsoft\ 没有 DesktopBridge 文件夹 - 这似乎是导致问题的原因。 Clean SolutionRebuild Solution 在 VS2019 升级到版本 16.10 之前都运行良好

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)