0

It's been a couple of days that I'm trying to find out what's wrong with the redirection of versions but I miserably failed. Here is the situation:

  • there is a .net (framework 3.5) application called app.exe,
  • this application depends on assembly_1.dll,
  • assembly_1.dll depends on assembly_2.dll and assembly_3.dll.

If everything is built with the same version - let's say version 2.0.0.0 - no surprise: everything is working and app.exe can be launched.

Now I change the version of assembly_1.dll, this is now version 1.0.0.0. Without a redirection app.exe cannot be launched since assembly_1.dll version 2.0.0.0 cannot be found. So I added app.config.exe:

<?xml version="1.0"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="assembly_1"
                          publicKeyToken="1234123412341234" />
        <bindingRedirect oldVersion="0.0.0.0-99.99.99.99" newVersion="2.0.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

The surprise here is that app.exe still cannot be launched, even though the version of the assembly_1 should be now considered as 2.0.0.0.

The surprise continued when app.exe could be launched when redirecting assembly_2 (the redirection of assembly_3 appears to be useless?!).

Could someone point out the processes involved in such a behavior? Is there some kind of automatic bindings?

Regards, Davy

Jester
  • 56,577
  • 4
  • 81
  • 125
Davy
  • 429
  • 2
  • 17
  • The new version is wrong! Maybe 1.0.0.0 – bdn02 Jan 13 '16 at 15:52
  • I don't think so, the base version is 2.0.0.0 (version of the .exe), and I deliberately changed a dependency back to the version 1.0.0.0 – Davy Jan 14 '16 at 07:38

0 Answers0