views:

249

answers:

4

Hi,

I have created a Windows Form Application using Visual C# 2008 Express Edition with target as .NET 2.0. Now I need to build this project for .NET 1.1. The problem I am facing is that the designer classes are not supported in .NET 1.1. They use the partial keyword which is not supported in .NET 1.1. What steps do I need to follow to make my project backward compatible for .NET 1.1.? I would like to keep my .NET 2.0 project so that I can edit using the designer but during build time would like to convert to 1.1.

Please let me know whats the easiest way to do this.

Regards, Jagannath

A: 

Partial classes just separate your code from the designer generated code. So to make the forms 1.1 compatible you have to copy the code from your partial class into the class containing the designer-generated code, making it a single class.

Robert Harvey
A: 

There could potentially be a great many other things that you need to change as well as the partial classes, but that's a good starting point. There are quite a few differences between 1.1 and 2.0. If your Winform is relatively simple, you probably won't have too many other changes to make. If you've made use of components and base classes that aren't in 1.1, you may end up finding your job is easier to just reprogram from the ground up.

BBlake
A: 

Why do you need to build it for .NET 1.1? Why not just install the .NET Framework 2.0 on the .NET 1.1 systems and run the .NET 2.0 version?

Do you and your customer truly realize just how old .NET 1.1 is? It shipped with Visual Studio 2003. Visual Studio 2010 beta just shipped. 2003-2010=a very long time in terms of the computer industry.

The two frameworks work well when installed on the same system. The only thing I'd be careful of is if any of the .NET 1.1 systems are running ASP.NET. If so, then after installing .NET 2.0, you'll want to run the .NET 1.1 version of aspnet_regiis on all the .NET 1.1 web applications. .NET 2.0 installation upgrades the script mappings to 2.0, and that doesn't work for all web applications.

John Saunders
A: 

Basically you are doing a reverse 1.1 to 2.0 port and hence Microsoft .NET Framework 1.1 and 2.0 Compatibility should come in handy.

merkuro