.Net Framework 3.5 breaks ASP.NET 2.0 web sites!

Thursday, September 27, 2007 3:16 PM | Leave a reply »

I'm one of those that have already installed and use Visual Studio 2008 beta side by side with Visual Studio 2005 on a machine and without any serious problems so far I might add. As you may already know .NET Framework 3.5 gets installed together with the new studio, so my machine contains that too (which is cool by the way, linq, Expressions, lamdas etc are probably the next big leap on programming languages).

Yesterday though, while trying to compile a .Net 2.0 web site I've stumbled across the following exception:

The base class includes the field 'InformationTBody', but its type (System.Web.UI.HtmlControls.HtmlGenericControl) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlTableBodySection)

After investigating the problem for a while, I found the following knowledge base article which explains the problem. It seems that when you install the .NET Framework 3.5, the .NET Framework files in the V2.0.50727 folder are updated. Therefore, when you install the .NET Framework 3.5, Visual Studio 2005 is affected. What's more important is that in the .NET Framework 3.5, the following HTML tags no longer map to the HtmlGenericControl class:

  • tbody
  • thead
  • tfoot

In the .NET Framework 3.5, these tags map to the following classes:

tbody HtmlTableBodySection
thead HtmlTableHeaderSection
tfoot HtmlTableFooterSection

So if, like me, you want to build your web site with .Net 2.0 framework and deploy it to a web server that .Net Framework 3.5 is not installed you'll need to change your Html server tags to something else... :-(


Comments

  1. Gravatar Glen says:

    Re : # re: .Net Framework 3.5 breaks ASP.NET 2.0 web sites!

    There are other problems too.

    Our 2.0 applications no longer compile. We extended the Page class, adding our own custom property.

    We now get this error:

    "Error parsing attribute 'X': Type 'System.Web.UI.Page' does not have a public property named 'X'."
  2. Re : # .NET Framework 3.5 Affects 2.0

    I have installed .NET Framework 3.5 along with already existing 2.0 as a part of Visual Studio .NET 2008
  3. Gravatar Steve says:

    Re : # re: .Net Framework 3.5 breaks ASP.NET 2.0 web sites!

    Have you tried targeting the build for .NET 2.0?

    Just wondering if that makes a difference.
  4. Re : # re: .Net Framework 3.5 breaks ASP.NET 2.0 web sites!

    Thats great news... framework 3.5 is going to rule the asp world...
  5. Re : # re: .Net Framework 3.5 breaks ASP.NET 2.0 web sites!

    sandblogaspnet.blogspot.com/...

    Read the last paragraph... :)

Leave a Reply



 

Please add 1 and 8 and type the answer here: