.net – How to decide what is the .Net target

netvisual studiovisual-studio-2008

We now use VS2003 (target to .Net 1.1) and we want to upgrade to VS2008, but I wonder what should be the new .Net target?

  1. Should I leave the target as .Net 1.1 (very old, not installed on all computers) or upgrade it?

  2. If I upgrade – Is 2.0 enouth? or maybe upgrade to the latest 3.5 (our clients use Windows XP, Vista and Windows 7)

  3. What happens if I target my app to 2.0, and the user has 3.5? should the user install .Net 2.0 on .Net 3.5? can it work side by side even when installing old version "above" new version? or maybe the application would work without errors and warnings because 3.5 "includes" 2.0?

Thanks,

Atara

. . .

Thank you all.
I guess I am going to target to 2.0, to cover most of my clients, and if a client does not have any .Net installed, I will ask him to install the latests (3.5 and later 4)

Can you please just confirm that .Net 3.5 just added more assemblies to 2.0, and does not include bug-fixes for 2.0 assemblies ?

(The computer skill level of my users is not high, Less installation is better)

. . . Update:
See my problem –
Microsoft .NET compatibility

Thank you for answering.

Atara

Best Answer

You cannot target 1.1 with VS2008 so scratch that option. There are no real differences between 2.0, 3.0 and 3.5, they all use the same version of the CLR. Versions 3.0 and 3.5 just added more assemblies. Notably those that support WPF, WCF and Linq.

If you are not interested in using these new features then targeting 2.0 will work just fine. And your program will run without problems if the target machine has any version of .NET equal or greater than 2.0 installed.

Finding out that you might accidentally uses a class that's only available in a later version is easy enough, you simply can't add the assembly reference when you use Project + Add Reference. The later ones will be grayed out in the list. It is also well documented in the MSDN Library, the framework version the class is available in is listed at the bottom of the page.

Yet one more option: if you have a lot of customers still on XP that don't have .NET installed yet then you might want to consider checking the "Client-only Framework subset". This cuts down the assemblies you can reference to the core ones, the associated Client Framework install is a very lean 28 MB.