This is a migrated thread and some comments may be shown as answers.

web.config option to redirect previous version .dll to new version .dll

2 Answers 1143 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cliff
Top achievements
Rank 1
Cliff asked on 06 Apr 2009, 08:02 PM
The following option can be added to web.config to redirect an older assembly to the
.dll fo a newer assembly.

This works even if the older control is embedded into a third-party module.
This will also work to correct AjaxControlToolkit version ambiguity between earlier versions and asp.net 3.5

This example will take the Q3 2008 version of the Telerik.Web.UI and redirect all controls to the Q1 2009 assembly

<runtime> 
   <dependentAssembly> 
      <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4"/> 
     <bindingRedirect oldVersion="2008.3.1125.20" newVersion="2009.1.311.20"/> 
   </dependentAssembly> 
</runtime> 

6 lines of code to prevent many hours and frustration.

enjoy
Cliff
 PR: wait...  I: wait...  L: wait...  LD: wait...  I: wait... wait...  Rank: wait...  Traffic: wait...  Price: wait...  C: wait...

2 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 07 Apr 2009, 08:27 AM
Hello Cliff,

Thank you for sharing your code.

You can make your BindingRedirect universal using the following approach:
<runtime> 
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
    <dependentAssembly> 
      <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" /> 
      <bindingRedirect oldVersion="2008.1.1.20-2009.4.2000.20" newVersion="2009.1.402.20"/> 
    </dependentAssembly> 
  </assemblyBinding> 
</runtime> 

Regards,
Daniel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Le Duc Hieu
Top achievements
Rank 2
answered on 17 Mar 2011, 10:32 AM
Hello Admin.
i got the same problem when i converted my project to newer telerik version, i tried to set the my web.config like the code u gave but my project is not working and i dont know how to resolve this bug, can u help me to solve this issue, my bug is "Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)".

im using visual web developer express version 2008 and telerik web controls Asp.Net Ajax 2009.

thanks in advance.

best regards.
Tags
General Discussions
Asked by
Cliff
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Le Duc Hieu
Top achievements
Rank 2
Share this question
or