Migrating from .NET 1.1 to 2.0

"Does my 1.1-compiled software work if the user has Framework 2.0?" — This has been a real FAQ for me, and I've been asked about different sorts of scenarios quite a few times since 2.0 was released. The short answer is "Yes, it works", and the long answer is "You should read the MSDN white paper on the subject". But truth be told, Microsoft did such a good job in providing runtime compatibility that these problems aren't particularly interesting – even to the point where I've seen the example of an ASP.NET 1.1 site accidentally being run under 2.0 without anyone even noticing.

That said, there are always issues that always surface when migrating. Also, version upgrades are the spot where you come into terms with all your past sins. One nasty example from the close past: you've always relied on the fact that you can get the filename of your .ascx control using typeof(this).Name. Well, that's what happened in ASP.NET 1.1, because "Foo.ascx" got compiled into something called "ASP.Foo_ascx". Well, Microsoft then fixed a bug that occasionally caused controls in different directories but same filenames to overlap with each other, and now "Foo.ascx" gets compiled to something like "ASP.MyControls_Foo_ascx" (if it resides in the MyControls directory). Changes like this are real headaches as they're not really documented – from Microsoft's perspective, this is certainly not a breaking change. It's just that you were wrong all along, trusting that class names have a relation to file names – an assumption that carries no validity when thought of independently, but one that probably made a lot of sense to the coder at the time.

When we get to the field of recompiling applications under 2.0, and web applications in particular, the Redmond-provided swamp gets far deeper. I hope to be back on the subject one day – there's quite a lot I wish to say on the suboptimal work Microsoft did on rewriting the web project model in Visual Studio.

August 20, 2006 В· Jouni Heikniemi В· One Comment
Posted in: .NET

One Response

  1. ramki - July 9, 2007

    i need information about example of migrating from .net 1.1 to 2.0