.NET 1.1 to 2.0 Upgrade Post-Mortem

A while back we upgraded from .NET Framework 1.1 to 2.0 on one of our large projects and we have been developing on .NET 2.0 for the last couple of months. This upgrade was a success as we met our objective within the allocated budget and timeframe. I am going to share our experience as it may help other people who are considering upgrading from .NET 1.1 to 2.0.

Our application is a rich client (WinForms) solution that interacts with middle-tier via Web Services and is fairly large (more than 250 Visual Studio projects including unit tests) and has a 70% VB.NET / 30% C# code-base.

Our primary justification for the upgrade was saving in development effort and costs. We looked at the project plan and identified those tasks that would require less effort if we upgraded to .NET 2.0. These tasks were primarily related to enhancing the application framework (menus, transaction/session management, configuration management, etc) and as you may know many of these features are built into the .NET Framework 2.0. We then subtracted the estimated effort required for the upgrade process. This included the time required for the conversion process, non-productive time if developers had to stop development for a short period of time as well as any productivity loss across the team as they were switching to a different environment (VS2005). Since we have around 50 developers on the team, we would lose one man-day for each 10 minutes of non-productive time so we had to make sure the impact on the development team is minimised.

We planned a process where four developers were responsible for converting the projects from Visual Studio .NET 2003 to Visual Studio 2005 format and making necessary changes to the code and the automated build process while other developers carried on their development on .NET 1.1. How? Well, when you convert a project using Visual Studio 2005's conversion wizard, most of the changes are applied to the project and solution files not the source code files (Typed DataSets are an exception - .designer.cs/vb files replace the .cs/vb files). So all we had to do was to ask the rest of the team not to have any project/solution files checked out during the conversion process.

We communicated the plan to all team members and four developers started the conversion process on a Friday morning while other developers carried on as normal (with one limitation that they could not change any project/solution files through the day). We continued the conversion process on Saturday (with 3 resources) and had our first .NET 2.0 successful build on Saturday afternoon. Sunday was dedicated to testing the application to make sure the functionality of the application had not been adversely affected by the upgrade.

On Monday morning, developers started to use Visual Studio 2005 after getting the latest version from the source control and spent the rest of the day on getting familiar with the new environment and addressing any minor issues they could find.

The interesting point is that the conversion process was hassle-free in terms of code and binary compatibility between .NET 1.1 and 2.0 (a big thank you to the CLR team at Microsoft!). Before starting the upgrade, we tested the third-party controls (all compiled against 1.1) we were using to make sure they work fine when run under CLR 2.0 and although we did not find any particular problem, we were expecting some minor issues requiring attention but this never happened.

So if you are considering upgrading your application from .NET 1.1 to 2.0, here are a few points to consider:

- Don’t forget that you need a business driver for the upgrade.

- Communicate your plans and any issues/risks associated with the upgrade to the development team, project management team and the client and let everyone contribute to the planning and decision making process.

- Be patient! Yes, it may take a while before the project management team and/or your client/business sponsor make their mind, and they may ask you to wait until a more suitable time to reduce the project risk.

- Have a well-written and step-by-step plan, including roll-back procedure for each step.

- Make sure all (or most) of the developers on the team are happy with such a change.

- Make sure your source control software supports integration with Visual Studio 2005 (if you use this feature).  This also applies to any other tool that integrates with the IDE like Add-ins and Macros.

- Make sure you can still use any third-party components you are currently using. First double check with your vendor to see whether they can provide you with an assembly that is compiled against .NET 2.0. If not, ask them whether you can use their existing .NET 1.1 assemblies under .NET 2.0. CLR 2.0 is backward compatible so you can run any assembly compiled against .NET 1.1 in a .NET 2.0 application domain. This happens automatically when you run a .NET 2.0 application that references an assembly compiled against .NET 1.1. But you still need to make sure the vendor supports such a deployment even if their component is not affected by the .NET 2.0 breaking changes.

Once you have made sure you get support from the component vendor after upgrading to .NET 2.0, you need to test your component under .NET 2.0 to make sure you get the same functionality. In order to do this, you can create a new .NET 2.0 project and test the component in the new project but this does not take into account every scenario you may follow in your application. The recommended approach is to configure your application to run under .NET 2.0 and then test the third-party component. This is where having a good coverage on unit tests can be very helpful.

- Practice! Before starting the conversion, you need to do a test run for the whole process at least once. You don’t want to be surprised by an unknown problem when the whole development team is waiting for the upgrade to be completed. We performed the whole upgrade process twice before doing the actual conversion and as you can imagine, we spent less time on the conversion process on the second and the third round.

- Ask for help/guidance. If you work for a Microsoft Certified Partner or a Microsoft Gold Certified Partner, there are multiple channels through which you can get help and advice from Microsoft directly. Otherwise, you can get advice from Microsoft Partners who have experience in upgrading to .NET 2.0 or talk to your account manager at Microsoft if you have one.

Published Monday, January 15, 2007 5:50 PM by Mehran Nikoo

Comments

# Real World Customer Experience in Migrating from .NET Framework 1.1 to 2.0

It has been just over a year since .NET Framework 2.0 \VS 2005 shipped , SP1 is out , and Vista (with

Monday, January 15, 2007 11:56 AM by Brad Abrams

# re: .NET 1.1 to 2.0 Upgrade Post-Mortem

Well, it is not only the GUI that can be a problem. There are several others bug "fixes" that are hiding within .NET 2.0

http://redsolo.blogspot.com/2006/09/one-more-nail-in-coffin-for-unchecked.html

Tuesday, January 16, 2007 2:09 AM by red

# re: .NET 1.1 to 2.0 Upgrade Post-Mortem

Can I ask what your configuration/build management environment and processes looked like before and after your upgrade?  This is our largest issue.  We have a very successful, tight feedback loop with our current setup and I'm having a hard time justifying the move to 2.0 and VS 2005.

Friday, January 19, 2007 9:52 PM by Ryan Cromwell

# re: .NET 1.1 to 2.0 Upgrade Post-Mortem

Before Upgrade:
CruiseControl.NET
NAnt
NUnit

After Upgrade:
CruiseControl.NET
NAnt
MSBuild
NUnit

We added the MSBuild to the picture as we were using NAnt's <solution> task to compile our build solutions. As part of the upgrade, we changed our build scripts to compile individual projects using MSBuild (we were planning to switch to <project> task even if we were not upgrading to .NET 2.0). As far as I remember this took us half a day as our build master wrote a macro to convert VS.NET 2003 solutions to MSBuild scripts.

In order to minimise the effort and risk, we kept our NAnt scripts and the only thing we changed was to replace the <solution> tasks with an <exec> task that calls MSBuild. Our MSBuild script then manages the build order, etc.

From the CI perspective, we created a new CruiseControl project for our .NET 2.0 build with the new build scripts before converting the VS.NET projects. Other developers were only subscribed to the 1.1 build project in their ccTray (CruiseControl's client that sits on the taskbar). As soon as we were ready to check in the first group of converted projects, we stopped the 1.1 build and started the 2.0 build (which obviously failed) and we carried on converting the projects until we got a successful build on .NET 2.0. Another option was to create two development branches in source control so that both processes could run in parallel but we didn't need to as it was Friday afternoon and we did not expect too many changes so we decided not to create a new branch.

As I mentioned in my post, you will need to think about every single step in the upgrade process and I strongly recommend you to perform the conversion at least once in the test mode. You need to make sure the whole build process is successful after the upgrade and your application still runs as expected (you can do this by running your unit tests and running the application to verify the UI behaviour). I understand this comes at a cost but you need to manage the risks. In order to justify the costs, you need to look for areas where you can save time on the project and unless you have any other good reason, selling the upgrade idea becomes a challenge.

Saturday, January 20, 2007 1:33 AM by Mehran Nikoo

# Breaking changes when Migrating from .NET Framework 1.1 to 2.0

Well... there will be tons of article on the web about breaking changes when you migrate from .net framework

Monday, February 26, 2007 3:31 AM by Innovation needs Passion

Leave a Comment

(required) 
(required) 
(optional)
(required)