Using <bindingRedirect> to new version of assembly when new version doesn't exist

1.2k views Asked by At

I am using a bindingRedirect to redirect TFS assemblies from version 10 to version 11 in the cases where some clients have version 11 instead of version 10. The application was compiled with TFS v10 DLLs.

<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-10.65535.65535.65535" newVersion="11.0.0.0" />
</dependentAssembly>

The problem is that the redirect works fine if the client has TFS version 11 and not TFS version 10. If the client has TFS v10, and not TFS v11, then they get a runtime error:

Could not load file or assembly, :microsoft.TeamFoundation.Common, Version=11.0.0.0, ... etc.

Shouldn't the application fallback to use v10 of the DLLs if version 11 is not available?

1

There are 1 answers

2
Darin Dimitrov On

Shouldn't the application fallback to use v10 of the dll's if version 11 are not available???

No, since you instructed a binding redirect in your config file.