Tuesday, September 07, 2004

ASP.NET 1.1 to 2.0 Initial Upgrade Experience

I am currently attempting to convert a fairly large ASP.NET 1.1 based application to ASP.NET 2.0 so that I can continue my evaluation of Whidbey. So far, I have had a mixed experience. The application I am working on is composed of:

A) A set of class libraries and data access libraries written in C#. These libraries work with SQL Server 2000

B) A large ASP.NET project written in VB.NET. This project uses a mix of calls to the class library and calls directly to a MS SQL 2000 Database

First, I attempted to create a sample ASP.NET 2.0 application that calls the c# class library written in C# (V1.1) . I was surprised and happy to see that this functions flawlessly. I am able to connect my classes directly to an object data source, and bind them to gridViews and detailViews. This is great news.

I've also noticed a few other cool features:

I accidentally added a c# web page to an existing vb.net web app. To my surprise, you can now mix different languages in the same app.

The VS.NET 2005 IDE is vastly improved. I love being able to drag from the toolbox directly to the source view (I hate the design view, and never use it) . I also love the feature which allows you to quickly select a section of code by grabbing the tag at the bottom of the source pane.

Back to my project upgrade experience -->In the future, I may attempt to run the class library through the upgrade wizards, but for now I wanted to simply upgrade the website the ASP.NET 2.0. When you attempt to open a 1.1 application, Visual Studio .NET 2005 automatically opens a wizard which provides you the opportunity to back up the application. The upgrade process takes a while to run, and eventually spits out an upgrade report.

For the most part, it initially appeared like the upgrade had succeeded, although the log reported that it was unable to parse 6 files. I could not see any reason why these files did not parse correctly.

After opening the converted project, I attempted to perform a build, and was left feeling disappointed. The compiler reported the maximum number of errors (92 errors + 60 warnings), and it hadn't even made it through the first 20% of the project files.

I see all kinds of strange errors listed in the task list:

Event "Load" cannot be found
Event "PreRender" cannot be found
name "Viewstate" is not declared
'asp' is an unrecognized tag prefix or device filter
'asp' is an unrecognized namespace (What?? This is on a page with a simple declared in the presentation layer. I'm glad that the IDE is now checking the markup during compilation, but I can't imagine that they've removed the ASP namespace)

name "SearchResults" is not declared --> These types of errors show up in my codeBehind files, even though my old project had them declared in the codeBehind file. At the MSDN event, I was told that we no longer need to declare our page controls in the codeBehind file because Visual Studio takes care of that for us. Supposedly, Visual Studio lets you use Partial classes, which allows the IDE to hide the ugly implementation details from the developer. Personally, I like to see everything, and I haven't figured out where VS.NET is trying to hide the rest of the class implementation. It looks like the conversion wizard tries to help out in this regard, but fails to place the control declarations in its hidden part of the code behind classes.

Even though this is a beta version of Visual Studio .NET 2005, I plan on plowing through this upgrade experience until I have a working version of my application. I will keep you up-to-date on any breakthroughs I have. I

0 Comments:

Post a Comment

<< Home