CsvHelper icon indicating copy to clipboard operation
CsvHelper copied to clipboard

Microsoft.Bcl.AsyncInterfaces dependency issue

Open imranakram opened this issue 1 year ago • 9 comments

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?

imranakram avatar Dec 20 '23 15:12 imranakram

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.

xeph avatar Jan 23 '24 19:01 xeph

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 avatar Jan 23 '24 20:01 JoshClose

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

JoshClose avatar Jan 23 '24 20:01 JoshClose

I have a similar issue here #2230

jchannon avatar Feb 10 '24 16:02 jchannon

Try version 31.0.2.

JoshClose avatar Feb 29 '24 21:02 JoshClose

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)

xeph avatar Mar 04 '24 14:03 xeph

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.

RobLSDev avatar Mar 04 '24 20:03 RobLSDev

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?

JoshClose avatar Mar 05 '24 15:03 JoshClose

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>

johnholliday avatar Mar 15 '24 10:03 johnholliday