Ignored "bindingredirect" starts working for no apparent reason


I have many projects that generate dlls and a main project that generates an executable, today i compiled the projects successfully, but when i tried to start the main project i got for the first time the next exception: "Assembly manifest definition does not match assembly reference", so is not the first time i recompile the projects and exectue the main one without problems, but now i'm getting this error.

After check the exception i could find a "bindingredirect" in the app.config that is causing it, i checked older versions of the system and the thing is that this "bindignredirect" always has existed in the app.config, but this error never was thrown before, if i comment the bindingredirect line the main project starts with no problmes.

All the projects have .net 3.5 as the target .net version, what could cause this? What could have changed so that the bindingredirect now get execute?

App.config section

<!-- Habilita el debug just-in-time. -->
  <system.windows.forms jitDebugging="true" />
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Componentes" publicKeyToken="BB48DC83EB7CD949" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion="" />

FusionLog of InnerException

=== Información de estado anterior al enlace ===
LOG: Usuario = ymora
LOG: DisplayName = Componentes, Version=, Culture=neutral, PublicKeyToken=bb48dc83eb7cd949
LOG: Appbase = file:///E:/Yerald Mora/Documents/SISTEMAS/Principal/bin/
LOG: PrivatePath inicial = NULL
Ensamblado de llamada : Principal, Version=, Culture=neutral, PublicKeyToken=c078d737fbb55d54.
LOG: Este enlace empieza en el contexto de carga default.
LOG: Utilización del archivo de configuración de la aplicación: E:\Yerald Mora\Documents\SISTEMAS\Principal\bin\Principal.vshost.exe.config
LOG: Utilizando el archivo de configuración del equipo en C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Redirección detectada en el archivo de configuración de aplicaciones: se redirigió a
LOG: Referencia posterior a la directiva: Componentes, Version=, Culture=neutral, PublicKeyToken=bb48dc83eb7cd949
LOG: Ya se detectó el mismo enlace, que generó un error hr = 0x80131040.
asked on Stack Overflow Mar 31, 2021 by Gerard_93

1 Answer


Making tests with the older versions of the system, i realized that the versions numbers for the dll, in the revision number its ever began with a number higher than 17, for example, and that was the problem!..., in the app.config the next line establsih that any version between and should be redirected to

<bindingRedirect oldVersion="" newVersion="" />

In the FusionLog of the InnerException the next line shows that the dll version was redirect to

LOG: Redirección detectada en el archivo de configuración de aplicaciones: se redirigió a

So when i compiled the project visual studio generated the revision number 17265, this one was in the range stablished in the appconfig, thats the reason due before was working with no problems because the revision number always was out of then range stablished in the property bindingredirect of the appconfig

answered on Stack Overflow Mar 31, 2021 by Gerard_93

User contributions licensed under CC BY-SA 3.0