MSB3644 - 缺少 .NET 4.5 SDK

MSB3644 - Missing .NET 4.5 SDK

我正在尝试构建我的项目(需要在 .net 4.5 中编写)但是自从我切换到我的笔记本电脑后它显示了这个错误。

我试图搜索 .net 4.5,但显然 sdk 下载不再可用 (https://dotnet.microsoft.com/en-us/download/visual-studio-sdks)。

有人有这个sdk吗?

在哪里可以下载?

谢谢。

P.S。我使用 JetBrains Rider 作为 C# Ide.

您应该改用 4.5.2 SDK,4.5.0 是为了满足 Microsoft 其他依赖应用程序的目标而匆忙交付的。阅读 Announcing the .Net Framework 4.5.1 Preview 中的字里行间。 4.5.2 很快取代了以前的版本,然后作为一个社区,我们从未谈论过这两个早期版本。

从可分发兼容性的角度来看,.Net 4.5.2 被认为是唯一可行的可分发版本,因为所有 v4 版本都是就地升级,您不能同时安装 4.x 个版本-边。如果您的部署目标安装了任何 .Net 4.x 应用程序,根据概率的平衡,它应该已经更新到 4.5.2

Install .NET Framework for developers
All .NET Framework versions since .NET Framework 4 are in-place updates, so only a single 4.x version can be present on a system. In addition, particular versions of .NET Framework are preinstalled on some versions of the Windows operating system. This means that:

  • If there's a later 4.x version installed on the machine already, you can't install a previous 4.x version.
  • If the OS comes preinstalled with a particular .NET Framework version, you can't install a previous 4.x version on the same machine.
  • If you install a later version, you don't have to first uninstall the previous version.

.Net 4.5.2 被认为是 4.5 运行时的 唯一稳定的 构建,用于遗留开发目的

.NET Framework 4.5.2, 4.6, 4.6.1 will reach End of Support on April 26, 2022
The .NET Framework was previously digitally signed using certificates that use the Secure Hash Algorithm 1 (SHA-1). SHA-1 is a legacy cryptographic hashing algorithm that is no longer deemed secure. We are retiring content that were signed using digital certificates that used SHA-1 to support evolving industry standards.

Also see .NET Framework Releases to learn about newer releases.

我怎么说都不为过,你应该以 4.5.2 为目标,因为这是行业要求在 4.5 中编译应用程序时的期望。

Rider 支持论坛上有类似的帖子,每种情况的解决方案都是复制其他地方已安装的 SDK 文件,4.5 SDK 是随 Visua Studio 2012 一起发布的,因此您可以尝试寻找一个该产品的离线安装程序。