Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly System.Numeric.Vectors in ML.NET

I created a new console application .net46, install the latest ML and tried a simple LDA. Got the error above. None of the fix that I found on the web seems to work. It is looking for a 4.1.3.0 version of the System.Numerics.Vectors that does not exist.

like image 742
Marc Engher Avatar asked Apr 20 '20 13:04

Marc Engher


1 Answers

There is a problem that MSBuild requires version 4.1.3.0 but downloads 4.1.4.0 . You should add

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
        <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.4.0" />
    </dependentAssembly>
</assemblyBinding>

to MSBuild.exe.config . It usually located at C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin

I found this bug at Visual Studio 16.8.2 and 16.8.3 .

like image 63
Daniil Zemchenkov Avatar answered Nov 11 '22 01:11

Daniil Zemchenkov