Monday, November 26, 2007

Upgrade to .NET FX 3.5 - Assembly Binding

I've officially converted my main ASP.NET application from 2.0 to 3.5 this morning overall it was very painless, for the most part, just adjust the class libraries to use the .Net Frameworks 3.5, and modify web.config entries from System.Web.UI.Extensions, Version 1.0.61025.0 to System.Web.Extensions, Version=3.5.0.0.  The problem I ran into was that some of the control libraries I was using were compiled against the 2.0 framework.  Adding the following keys to the bottom of my web.config files clean that up.<configuration>
  ....
  <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>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
-ec

No comments:

Post a Comment