Ho un'applicazione che fa riferimento a questa assemblea in ambienti di sviluppo:redirect Binding fallisce - diverso publicKeyToken
name="Microsoft.Data.SqlXml" culture="neutral" publicKeyToken="89845dcd8080cc91" version="9.0.242.0"
Tuttavia, server di vivere contiene vecchia versione di questa libreria:
name="Microsoft.Data.SqlXml" culture="neutral" publicKeyToken="b77a5c561934e089" version="3.2.2917.0"
Come vedete publicKeyToken è diverso. Ho aggiunto bindingRedirect a app.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.SqlXml" culture="neutral" publicKeyToken="89845dcd8080cc91" />
<bindingRedirect oldVersion="9.0.242.0" newVersion="3.2.2917.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
ma ancora ottengo l'errore:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass embly 'Microsoft.Data.SqlXml, Version=3.2.2917.0, Culture=neutral, PublicKeyToke n=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Data.SqlXml, Version=3.2.2917.0, Culture=neutral, PublicKe yToken=89845dcd8080cc91' ---> System.IO.FileNotFoundException: Could not load fi le or assembly 'Microsoft.Data.SqlXml, Version=9.0.242.0, Culture=neutral, Publi cKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find t he file specified. File name: 'Microsoft.Data.SqlXml, Version=9.0.242.0, Culture=neutral, PublicKey Token=89845dcd8080cc91'
Esiste un modo per reindirizzare alla vecchia versione della libreria in quel caso?
Grazie, questo è quello che faccio ogni giorno. Cambio il riferimento al vecchio assemblaggio prima di fare il live release. È un peccato. Grazie. – dragonfly