CsvHelper
CsvHelper copied to clipboard
Microsoft.Bcl.AsyncInterfaces dependency issue
We are using CsvHelper in innofactor/pluginregistration. This is a .net 4.8 application that gets loaded in another framework. To get this to work I have to keep the dependency set to version 1.0.0 of Microsoft.Bcl.AsyncInterfaces otherwise, I get a dependency missing exception when we try to run CsvHelper. The side effect of that is that to keep this old version, we have to build this tool based on dependencies from 2021 from the framework (XrmToolBox)
Could you please update this dependency to version 6 or above, if this is possible?
Would be nice if it can get upgrade to version 8.0.1 (https://github.com/dotnet/core/blob/main/release-notes/8.0/README.md, it's an LTS supported for 3 years, from November 2023 to November 2026) or the dependency removed if it's not needed? It's currently breaking and restricting other librairies from Microsoft like System.Text.Json.
I believe you should be able to use a newer version of the dependency. The version referenced is the smallest version that will work. https://learn.microsoft.com/en-us/nuget/concepts/package-versioning?tabs=semver20sort#version-ranges
Depending on your project type, you might need to specify a bindingRedirect.
I have a similar issue here #2230
Try version 31.0.2.
This is what I get now when upgrading from 30.0.3 to 31.0.2
Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
This is what I get now when upgrading from 30.0.3 to 31.0.2
Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
We're getting similar errors with our .net 8 apps.
What version of Visual Studio?
What kind of project is it?
Do you have other NuGet packages installed?
If you look in your output, what version of Microsoft.Bcl.AsyncInterfaces is there?
Getting the same result. Visual Studio 2022 Professional (64-bit) - 17.9.3 Compiling for .Net Framework 4.7.2 Binding redirects don't work:
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>