views:

191

answers:

6

Hi all,

I'm currently using VS 2005 as most of the programs I maintain are written for .Net 2.0, I have one new program that requires .Net 3.5, should I switch to VS 2008 and can I do so without any problems with my .Net 2.0 programs? What should I watch out for?

PS I mainly work with Winform apps if that makes any difference.

Thanks

+1  A: 

C# Project properties panel in Visual Studio 2008 contains drop down list to set target Framework: 2.0; 3.0 (SP1); 3.5.

You can set 2.0 for all your application and will have no problems in most of cases.

abatishchev
Well; few problems. As Jon explains, this isn't really 2.0
Marc Gravell
+1  A: 

I've worked in NET 2.0 projects in VS2008 without any problems. VS lets you choose the framework target for every project. I recommend the change to VS2008.

gcores
A: 

The added value in Visual Studio 2008 is worth moving from VS 2005 if it's possible for you to do so. The multi-targeting support within Visual Studio 2008 makes it entirely possible to keep working on a .NET 2.0 project. That said, once your project is moved to Visual Studio 2008, you might find it hard to move it back to Visual Studio 2005. So, you should think carefully about moving if that would ever be a requirement.

Dustin Campbell
+7  A: 

I would personally upgrade not just the IDE but the target framework if you possibly can. The benefits of being able to use LINQ are huge in my experience, for a wide range of problems.

If you really want to stay with .NET 2.0 you can use the "Target Framework" option of VS2008 as explained by abatishchev - but be aware that "2.0" really means "2.0SP1". If you accidentally use a 2.0SP1-specific type (e.g. DateTimeOffset) then your code won't run on a vanilla 2.0 machine.

Even if you're using .NET 2.0, you can still use most of the C# 3.0 benefits though.

Jon Skeet
A: 

If you have any Crystal Reports, be aware of the changes to the Setup packages you will be generating after the upgrade. Check the first few to make sure Crystal 2008 is a prerequisite.

WakeUpScreaming
+1  A: 

Be aware that .NET 3.5 (and you should be using 3.5 SP1) is just a pair of service packs, as far as .NET 2.0 is concerned - it includes .NET 2.0 SP1 and .NET 2.0 SP2. It includes .NET 3.0 SP1, which you don't care about, since you are not using .NET 3.0.

All the rest of it is a set of assemblies that are in addition to the assemblies used by .NET 2.0. Obviously, your .NET 2.0 code doesn't use these new assemblies, so the fact that the new assemblies exist on a particular computer won't matter to the .NET 2.0 applications.

This means that it's perfectly safe to target .NET 2.0 using VS2008 (SP1), but that you can use any of the new features in a given program, without compromising the .NET 2.0 part of the application.

The value add comes from the improvements in Visual Studio itself. The XML editor by itself is worth the upgrade, in my opinion, and I've advised people several times that if they want a good, free XML editor, they should get Visual Studio Express 2008!

John Saunders