JoshClose / CsvHelper

Library to help reading and writing CSV files
http://joshclose.github.io/CsvHelper/
Other
4.63k stars 1.05k forks source link

Microsoft.Bcl.AsyncInterfaces dependency issue #2215

Closed imranakram closed 2 weeks ago

imranakram commented 6 months ago

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?

xeph commented 5 months ago

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.

JoshClose commented 5 months ago

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

JoshClose commented 5 months ago

Depending on your project type, you might need to specify a bindingRedirect.

jchannon commented 5 months ago

I have a similar issue here #2230

JoshClose commented 4 months ago

Try version 31.0.2.

xeph commented 4 months ago

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)

RobLSDev commented 4 months ago

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.

JoshClose commented 4 months ago

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?

johnholliday commented 3 months ago

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>
mtissington commented 1 month ago

Same here

HarshaMVaidya commented 3 weeks ago

Is there any update on this ? the project does not work with 8.0. It has to be 7.0 version

JoshClose commented 3 weeks ago

I changed it to 8.0.0 in 33.0.0. If this causes people issues, I guess you'll have to figure out a solution together. This release also includes nullable.

HarshaMVaidya commented 3 weeks ago

Thanks a lot Josh for quick reply. I was using version 32. It worked with 8.0 with 33.0.0 version nicely. Thanks again for prompt reply