dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
9.05k stars 1.88k forks source link

DataFrame.LoadCsv() Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1' #7152

Open lucaspastorduran opened 6 months ago

lucaspastorduran commented 6 months ago

System Information (please complete the following information):

Describe the bug Using the method DataFrame Data = DataFrame.LoadCsv("myFIlePath") returns runtime exception: "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

To Reproduce Steps to reproduce the behavior:

  1. Create a DataFrame object from CSV file: DataFrame Data = DataFrame.LoadCsv("myFIlePath")

Expected behavior It should parse the csv data into the DataFrame object.

Screenshots, Code, Sample Projects image

Additional context It is looking for the System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, which is contained in the nuget package 'System.Runtime.CompilerServices.Unsafe 4.5.3'. However, the ML version 0.21.1 requires to install System.Runtime.CompilerServices.Unsafe with version >= 6.0 (which has a higer version than the one is looking for).