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

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

# re: .Net Framework 3.5 breaks ASP.NET 2.0 web sites!
Posted by Glen on 11/28/2007 11:04 PM
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'."
# .NET Framework 3.5 Affects 2.0
Posted by sfeldman.NET on 11/29/2007 4:11 AM
I have installed .NET Framework 3.5 along with already existing 2.0 as a part of Visual Studio .NET 2008
# re: .Net Framework 3.5 breaks ASP.NET 2.0 web sites!
Posted by Steve on 3/11/2008 6:28 AM
Have you tried targeting the build for .NET 2.0?

Just wondering if that makes a difference.
# re: .Net Framework 3.5 breaks ASP.NET 2.0 web sites!
Posted by Net Framework Development on 9/8/2008 11:34 AM
Thats great news... framework 3.5 is going to rule the asp world...

Post Comment

Title *
Name *
Email
Url
Comment *  


Please add 3 and 5 and type the answer here: