Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.Bcl.AsyncInterfaces #32797

Closed
mikeTWC1984 opened this issue Feb 25, 2020 · 1 comment
Closed

Microsoft.Bcl.AsyncInterfaces #32797

mikeTWC1984 opened this issue Feb 25, 2020 · 1 comment
Labels
area-Infrastructure-libraries question Answer questions and provide assistance, not an issue with source code or documentation.

Comments

@mikeTWC1984
Copy link

Microsoft.Bcl.AsyncInterfaces has dependency on System.Threading.Tasks.Extensions >= 4.5.2, and it works fine with 4.5.2 version. However if upgraded to 4.5.3 app will throw below exception

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manif
est definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Infrastructure-libraries untriaged New issue has not been triaged by the area owner labels Feb 25, 2020
@ericstj ericstj added customer assistance and removed untriaged New issue has not been triaged by the area owner labels Mar 14, 2020
@ericstj
Copy link
Member

ericstj commented Mar 14, 2020

When you upgrade a dependent nuget package you need to use bindingRedirects. That's expected and same for any package when used on .NETFramework. This happens automatically for most new projects. See https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection for information about enabling autogeneration of bindingRedirects.

The following is what will be generated in the app.config in this case.

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

This is not required on .NETCore which has a more flexible binding policy.

/cc @joperezr

@ericstj ericstj closed this as completed Mar 14, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
@eiriktsarpalis eiriktsarpalis added question Answer questions and provide assistance, not an issue with source code or documentation. and removed customer assistance labels Oct 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-libraries question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
None yet
Development

No branches or pull requests

4 participants