通过 NuGet 安装 System.Numerics.Vectors
Installing System.Numerics.Vectors via NuGet
当我尝试使用 NuGet 控制台安装 System.Numerics.Vectors 时,我得到了这个:
Package Manager Console Host Version 3.3.0.167
Type 'get-help NuGet' to see all available NuGet commands.
PM> Install-Package System.Numerics.Vectors -Version 4.1.0
Attempting to gather dependencies information for package 'System.Numerics.Vectors.4.1.0' with respect to project 'MyVeryNiceProject', targeting '.NETFramework,Version=v4.0'
Attempting to resolve dependencies for package 'System.Numerics.Vectors.4.1.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'System.Numerics.Vectors.4.1.0'
Resolved actions to install package 'System.Numerics.Vectors.4.1.0'
Install failed. Rolling back...
Package 'System.Numerics.Vectors.4.1.0 : ' does not exist in project 'MyVeryNiceProject'
Package 'System.Numerics.Vectors.4.1.0 : ' does not exist in folder 'C:\Users\V01D\Desktop\MyVeryNiceProject\src\MyVeryNiceProject\packages'
Install-Package : Could not install package 'System.Numerics.Vectors 4.1.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.
At line:1 char:1
+ Install-Package System.Numerics.Vectors -Version 4.1.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageComm
and
PM>
我应该怎么做才能解决这个问题?
如果您查看 System.Numerics.Vectors
的内容,您会看到它支持的框架。
我不完全确定 dotnet
是什么 - 它似乎是可移植 Class 库的新绰号 - 但其余部分绝对不适用于您的 .NET Framework 4.0 项目.
考虑到 net46
的支持,将您的项目更新为目标 .NET Framework 4.6 或更高版本应该可以解决问题。
当我尝试使用 NuGet 控制台安装 System.Numerics.Vectors 时,我得到了这个:
Package Manager Console Host Version 3.3.0.167
Type 'get-help NuGet' to see all available NuGet commands.
PM> Install-Package System.Numerics.Vectors -Version 4.1.0
Attempting to gather dependencies information for package 'System.Numerics.Vectors.4.1.0' with respect to project 'MyVeryNiceProject', targeting '.NETFramework,Version=v4.0'
Attempting to resolve dependencies for package 'System.Numerics.Vectors.4.1.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'System.Numerics.Vectors.4.1.0'
Resolved actions to install package 'System.Numerics.Vectors.4.1.0'
Install failed. Rolling back...
Package 'System.Numerics.Vectors.4.1.0 : ' does not exist in project 'MyVeryNiceProject'
Package 'System.Numerics.Vectors.4.1.0 : ' does not exist in folder 'C:\Users\V01D\Desktop\MyVeryNiceProject\src\MyVeryNiceProject\packages'
Install-Package : Could not install package 'System.Numerics.Vectors 4.1.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.
At line:1 char:1
+ Install-Package System.Numerics.Vectors -Version 4.1.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageComm
and
PM>
我应该怎么做才能解决这个问题?
如果您查看 System.Numerics.Vectors
的内容,您会看到它支持的框架。
我不完全确定 dotnet
是什么 - 它似乎是可移植 Class 库的新绰号 - 但其余部分绝对不适用于您的 .NET Framework 4.0 项目.
考虑到 net46
的支持,将您的项目更新为目标 .NET Framework 4.6 或更高版本应该可以解决问题。