views:

322

answers:

6

i work at a large company and we haven't distributed dotnet runtimes 3.0+ out to the desktops so we are all using vs 2005 and c# 2.0

is there any big benefit of moving to vs 2008 and still targeting 2.0 (since the runtime deployment will not be there soon) for the developers.

also, if the suggestion is to do the upgrade to vs 2008, are there any gotchas or things to worry about or prepare for.

Note: We are mostly doing winforms projects

+5  A: 

There is some good discussion on this topic on another thread and on this one.

Alvin Ashcraft
A: 

You'll need to keep in mind that it supports .NET 2.0 SP1, so there might be an upgrade needed.

Another thing to keep in mind is that you can still use some of the C# 3.0 features while still targeting the .NET framework. For instance, you can use lambdas, auto-properties. You can't use extension methods or any of the linq stuff, though. I would switch to 2008 for this reason alone; the C# 3.0 improvements increases productivity at least to the extent that it costs to change it.

Finally, I'm not sure about the IDE improvements; I use Resharper so what Visual Studio does on its own escapes me.

Michael Hedgpeth
A: 

Personally, I love to use VS2008 to down target 2.0 applications. Most of the new language features, including LINQ, can be used when down targeting 2.0 applications. True you need to provide you're own replacement for System.Core. There are several available so you don't have to hand code it. I feel like many of these features improve my programming enough to warrant this approach.

Language Features I enjoy using down targetted

  • Lambda Expressions (C# and VB.Net)
  • Extension Methods
  • LINQ queries (C# and VB.Net with additional LINQ lib)
JaredPar
The additional LINQ lib you refer to is part of .NET 3.5 (SP1). That would upset those who are still supersitious about upgrading.
John Saunders
@John, which lib? The only one I mentioned by name was BCLExtras and it has a 2.0 version specifically for down targetting
JaredPar
A: 

I think the biggest benefits of moving to 2008 will be the new features in C# 3.0. The runtime (CLR) for .NET 3.5 has not really changed a whole lot since 2.0. You may need to push out upgrades to all the clients, but that's not too bad (just tell people to update their .NET runtime using Windows Update.)

The programmers will thank you, there are some great new features in 2008!

Andy White
A: 

is there any big benefit of moving to vs 2008 and still targeting 2.0 (since the runtime deployment will not be there soon) for the developers.

I would say no, but think about this question from the otherside,

is there any big benefit of staying on VS2005 and still targeting 2.0 (since the runtime deployment will not be there soon) for the developers.

Still No.

J.W.
+2  A: 

Some of the IDE improvements include a far better XML editor and the new web forms designer.

I would recommend you upgrade to VS2008 SP1, which also includes a schema viewer for editing XML schemas.

If you target .NET 2.0, then your code cannot require any of the new assemblies, so your code would still work on a machine without .NET 3.5. You should roll out .NET 2.0 SP1 and SP2 to the desktops. Then, I believe that any new code you write that uses a .NET 3.5 SP1 assembly could simply ship that assembly with the code. There would be no affect on anyone else on the computer. .NET 2.0 through .NET 3.5 SP1 all use the same CLR, so there is no conflict.

John Saunders
+1 on the XML features! Saves your bacon more than once....
marc_s