What an amazing guy, that Scott Guthrie. The chronology tells the tale. I post about my ASP.NET 1.1-to-2.0 migration experiences at 2:04 AM last Friday night; Saturday morning there's a comment from Scott suggesting I send the project off for him to take a look. I clean up the project to focus on my two problem areas, post a detailed description on my blog, and email the project.zip to Scott at 4 o'clock Saturday afternoon. Here on Monday morning, and email from Scott with a detailed description of his findings is sitting in my inbox. Not only that, but he supplies the migrated project in VS2005 and--AND--a slightly modified version of my VS2003 for improved conversion. The timestamp on Scott's email containing the ASP.NET project was Mon 12/5/2005 4:08 AM...
I owe it to Scott and his generosity to share as much of his ASP.NET insights as possible, and doing that here will help clarify the changes in the ASP.NET 2.0 architecture model for me, too. So the ScottGu Bits Series begins with Episode #1: Scott Delivers.
As I said, Scott provided me with the migrated VS2005 project and a modified version of the VS2003 project I had sent him originally. I'll be providing excerpts of Scott's information to clarify specific points, but if you want to see his entire message, an HTML-version is here.
Scott writes:
I was able to convert, compile, and run your project. The good news was that it only took me about 10 minutes to-do the first pass of the conversion (getting it compiling and running using VS 2005). I think this success over what you were seeing was because of two things:
1) I’m using a slightly newer version of the migration wizard than the one that shipped at RTM. We are actually scheduled to ship this on the web soon (hopefully late next week) for anyone to download, and it addresses a number of the gotchas/cases we’ve seen people run into over the last few months.
2) I did one slight re-factoring tweak to your VS 2003 code before I converted it. Specifically, you had two base classes in your \wizards directory (wizprojbase and wizpropbase) that were pure base-classes that didn’t have any content in their associated .aspx files, yet were still attached to them (instead of being standalone classes). This makes it hard for the migration wizard to completely guess what to-do with the references to them, and can potentially complicate the migration process. What I did before converting was to copy their two base classes into new standalone class files with no .aspx, and then deleted the unused .aspx files.
I read about a new migration wizard coming the other night at Forums.ASP.NET and here Scott confirms it in his first point. He may have mentioned it elsewhere and I might have missed it, but a new migration wizard is on the way.
As for the second point, it actually fixed BOTH of the problems I was having: A) referencing a class outside of the \app_code directory, and B) nullreference exceptions from an ASPX.CS baseclass. (Links are to screenshots.) I'll elaborate on those individually.
In our next episode, we'll look at the changes in the VS2003 project made by ScottGu to facilitate ASP.NET 2.0 migration...