我尝试在代码中使用System.Numerics.Vector<double>()
但是出现了构建错误
类型或命名空间名称&#39; Vector&#39;命名空间中不存在System.Numerics&#39;
我错过了汇编参考吗?
我的csproj目标是.NET 4.6.1
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
其他类型正确显示
答案 0 :(得分:1)
例如,当您查看ToString方法时,MSDN会在顶部显示.NET版本。但对于Vector,奇怪的是,事实并非如此。它可能已从.NET框架移动到Nuget存储库,MS保留了MSDN文档,但没有说明任何内容。
无论如何,如果您确定使用4.6.1 runtime
(它不适用于4.5.1和4.5.2),只需安装this nuget package,它就可以正常工作。