dotnet / dotnet/machinelearning
DataFrame.LoadCsv() Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1'
- Dominant language
- C#
- Stars
- 9.4k
- Forks
- 2k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 11
Description
**System Information (please complete the following information):**
- OS & Version: Windows 10 Enterprise
- ML.NET Version: Microsoft.Data.Analysis 0.21.1
- .NET Version: .Net Framework 4.8 (NET SDK 6.0.417)
**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**

**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).
Contributor guide
Assessment
This issue has not been assessed yet.