dotnet / dotnet/machinelearning

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

Open
#7,152 0 comments 0 reactions 0 assignees View on GitHub
area-DataFrame untriaged
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**
![image](https://github.com/dotnet/machinelearning/assets/36445004/ee27bd6b-b99b-4aef-ad2d-3284a80d155a)

**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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.