Runtime: ValueTuple compatibility issues in .NET Framework 4.7.1

Created on 15 Oct 2017  路  12Comments  路  Source: dotnet/runtime

Cross posting for better visibility:
Microsoft/dotnet-framework-early-access#9

Fall creators update is going live in two days. Heads up! It will generate nasty compat issues for applications using Task<ValueTuple>. Not sure if this is a known issue or by design, but I have lost entire day today trying to track it down.

area-System.Runtime bug tenet-compatibility

Most helpful comment

Closing this issue as this problem is now being tracked in a different repo: https://github.com/dotnet/standard/issues/567

Just as a small FYI, this problem has been addressed in the next version of .NET Framework and a fix for it will be serviced to 4.7.1 machines.

All 12 comments

@ericstj @weshaggard @jcouv is this a known problem?

@AlexGhiondea is this problem known? If not we probably should investigate to understand it.

This was not know. But what is happening is that the System.ValueTuple that gets loaded is the one carried with the app -- there is a binding redirect in the .config file that forces that. Removing the binding redirect allows the app to work.

Yup. Commenting out this single binding redirect:

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

Makes the application run without any issues.

@AlexGhiondea so binding redirects overwrite the unification table? If that is the case we might be hitting other similar issues with other things we moved inbox.

If I understand correctly .NET Framework 4.7.1 today starts getting rolled out to customers through the Windows Update (inside the Fall Creators Update)? It's Oct 17th... I am a bit afraid it might break some apps... including ours... before you even have a chance to fix this issue.

@weshaggard yes, the binding redirects override the unification table.

After the Windows Update our code now fails at runtime with "Method not found: 'System.ValueTuple`2" wherever tuples get invoked.

Cannot seem to find a way around this. Our codebase targets 'net462' (as to run on Azure) but local machines are now on 4.7.1. What to do?

@marchy The only reasonable workaround I know is to retarget to net47.

Hey @marchy this is a known issue in 4.7.1. More information about it is here

Currently the workaround is to either manually remove the binding redirects to System.ValueTuple of, as @mkosieradzki mentioned, re-target the application to 4.7 or 4.7.1.

We are working on a fix for this.

Thanks for the very prompt reply @AlexGhiondea @mkosieradzki.

Re-targeting to 4.7 solved it :)
(while re-targeting to 4.7.1 is not feasible since apparently Azure doesn't expect support for it until December)

Closing this issue as this problem is now being tracked in a different repo: https://github.com/dotnet/standard/issues/567

Just as a small FYI, this problem has been addressed in the next version of .NET Framework and a fix for it will be serviced to 4.7.1 machines.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aggieben picture aggieben  路  3Comments

matty-hall picture matty-hall  路  3Comments

v0l picture v0l  路  3Comments

Timovzl picture Timovzl  路  3Comments

jzabroski picture jzabroski  路  3Comments