无法在 MS Visual Studio 2017 中安装 NuGet 包 MPI.NET 1.3.0

Could not install NuGet package MPI.NET 1.3.0 in MS Visual Studio 2017

我正在尝试将 NuGet 包 MPI.NET 1.3.0 安装到 MS Visual Studio 2017 C# 项目。我收到以下错误:

Could not install package 'MPI.NET 1.3.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

我曾尝试在不同版本的 .NET Framework 中创建 C# 项目,但无法安装。在这个包的官方 GitHub 站点 (MPI.NET GitHub repository) 上写着这个包是为 .NET 4.0 更新的。我尝试创建 4.0 及更低版本的项目,但没有成功。

有人帮忙吗?

查看 nuget.org 上可用的包,version 1.3.0 targets .NET 4.6.2, whereas version 1.2.0 以 .NET 4.0 为目标。因此,如果您尝试将包的 1.2.0 版本安装到您​​的项目中,您应该没问题。听起来 GitHub 文档需要更新以反映这一新现实。

(就我个人而言,我会为这样的更改增加主要版本号,因为它不一定向后兼容现有用户,但语义版本控制不像有时听起来那么简单。)