Hi Dave,
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.
You can see
the pre-converted app with the modifications to #2 attached above.
When I ran
the migration wizard on the resulting app, it did end up generating some stub
abstract classes because your one of your wizard base classes had several
direct typed references to wizard steps implemented in your \controls\wiz
directory. What the migration wizard ended up doing was generating stub
abstract classes containing referenced methods so that your base class could
remain un-modified.
This would
have compiled clean, except that the migration wizard moved an un-used static
field property accessor to two of the stub classes
which caused a compile error. So I moved it out of the base classes and
re-declared it in the controls that needed it, and then everything compiled
cleanly. I ran the app and verified the functionality worked as well.
What
remains to look at now is whether there is a better way to structure the
inheritance hierarchy of the classes in your app_code\migrated
directory (which is where all stub-classes are stored). In looking at the
classes, it appears that you have several common methods on each of the
individual stubs – my recommendation would be to consider encapsulating these
in 1-3 common base classes or interfaces that you use as a clean contract that
your base classes worked with (this should also scale better as you start to
add more wiz controls).
One of the
other things we are looking to talk about very shortly (sometime later this
month) is a way for VS 2005 to also support projects that are built more like
the VS 2003 web projects (1 single .dll for
everything) than the new web-site model (where we compile into multiple dlls). We think the new web-site model brings a lot
of new benefits (and so we will still be pointing people towards that as the
default way to build new apps), but we also want to make sure we can enable
easy migration without requiring code-changes. The good news is that I
was able to try out the project you sent me with the new project template, and
was able to get it converted over in about 90 seconds – with no code changes
required (all of your existing code and directory structure stayed the same –
the migration wizard doesn’t refactor your code at
all). I’ll send you a pointer to this as we start talking about it
soon. This might be an alternative approach for you to take if you want
to quickly migrate your app forward to ASP.NET V2.0
without requiring you to spend anytime on migration
Hope this
helps,
Scott