views:

63

answers:

1

I use VS2008 at home and love it, while approaching work about upgrading 2005 to 2008, one of my obvious causes for concern are all the 2005 solutions we have lying around.

While it may be simple for us to upgrade to 2008, we do work with other developers that use 2005 and will not be upgrading to 2008 in the near future.

I understand that the project files are cross compatible with no problems, but the solution files are not.

Here are some links I have come across so far:

I am curious, has MS approached this problem head on? Have their been any hotfixes to address it? It seems like a pretty poor attempt at cross-compat since there are no real changes between the solution files (i.e. 2008 could easily ignore the extra content from 2005)..

PS: This is of course all assuming we do not utilise any of the new framework things in 3.5..

+3  A: 

The simplest approach is simply to keep two copies of the sln files - a 2005 set and a 2008 set. Actually, I often consider the sln file completely transient and developer specific (rarely in source control), but different people find different setups helpful. MSTest is a big culprit here (darned testrunconfig files... pure crazy...).

Note that using 2005 and 2008 also carries the risk of your 2008 devs using C# 3 features accidentally. Some of them aren't obvious, such as the improved generic type inference - for example:

int[] data = {1,2,3,4,5};
string[] strings = Array.ConvertAll(data, delegate(int i)
    {return i.ToString();});

Which requires the <int,string> in C# 2.0, but not in C# 3.0. A similar risk would be any designers / other tools that generate code - the VS2008/C# 3.0 versions might include "partial methods", which won't work in C# 2.0.

If you can, try to upgrade everybody in a fairly short time-frame to minimize any pain from this risk...

Marc Gravell
Interesting point that you do not keep the solutions in source control.. TBH, something I never considered since I have always included as a habit! +1 from me for sure!
Rob Cooper
@Rob - after all, different devs might be working on a different set of projects...
Marc Gravell
We did this with VS2003 and VS2005 - worked well
Fortyrunner
Indeed, makes real sense, and TBH, I have often had cases where I have checked out the solution and been pissed because there has been so many project references. Much cleaner to work on your own solutions and reference what you want :) Thanks :)
Rob Cooper