Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple System.Web.Extensions assembly in same project?

I'm having trouble moving a website from one server to another. It seems to be a problem loading multiple versions of System.Web.Extensions. The code uses version 3.5 in most places but a third party control appears to be needing version 1.0.6. I didn't think this was possible but it appears to be working in it's current situation.

Is there a way I can use the GAC version of System.Web.Extensions for the site but import a dll of version 1.0.6 just for these controls?

like image 608
Mark Clancy Avatar asked Feb 14 '26 18:02

Mark Clancy


1 Answers

Have you tried putting an assemblyBinding tag in your config like so:

 <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
like image 164
Thomas Avatar answered Feb 16 '26 07:02

Thomas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!