Sunday, April 24, 2011

Assembly Binding Redirection

I recently started working with the latest version of the Telerik RadControls for ASP.Net AJAX (Q1 2011).  However, my current Sitefinity site (which is running on Sitefinity v. 3.7 SP4) still utilized a much older version of the Telerik RadControls.  Therefore, I was worried that my development would cause my Sitefinity instance to break.

Fortunately, Assembly Binding Redirection came to my rescue.  Since the Telerik.Web.UI DLL does not have any other dependencies, I could easily redirect the old version to the newer version in my Sitefinity website.

This is the code that I placed into my Sitefinity web.config file:


  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" />
        <bindingRedirect oldVersion="2010.2.826.40" newVersion="2011.1.315.40" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

No comments:

Post a Comment