This relates to use of the System.Numerics.Vectors (nuget package 4.5) in a dotnet standard 2.0 library, and consuming that library from a Windows .NET Framework application.
When the runtime attempts to load System.Numerics.Vectors this error is reported...
System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Reverting to System.Numerics.Vectors 4.4.0 resolves the problem.
Example code:
dotnet standard 2.0 library class...
namespace FooLib
{
public class Class1
{
public void DoStuff(int[] arr)
{
var va = new Vector<int>(arr, 0);
var vb = new Vector<int>(arr, 4);
var vc = va + vb;
vc.CopyTo(arr, 0);
}
}
}
.NET Franework 4.7 console app
class Program
{
static void Main(string[] args)
{
int[] arr = new int[32];
Class1 c1 = new Class1();
c1.DoStuff(arr);
Console.WriteLine(arr[0]);
}
}
This relates to use of the System.Numerics.Vectors (nuget package 4.5) in a dotnet standard 2.0 library, and consuming that library from a Windows .NET Framework application.
When the runtime attempts to load System.Numerics.Vectors this error is reported...
Reverting to System.Numerics.Vectors 4.4.0 resolves the problem.
Example code:
dotnet standard 2.0 library class...
.NET Franework 4.7 console app