This is a mirror of official site: http://jasper-net.blogspot.com/

Sharing Solutions between VS 2008 and VS 2010

| Sunday, March 14, 2010
I have a solution with several projects that I currently work on in VS 2008. I would like to use VS 2010 for it instead, to benefit from new debugger features etc… but it should remain on the .NET 3.5 platform, and I would also like to keep things compatible so the solution can be opened and built in VS 2008 later on, if necessary.

I’m sure I haven’t looked at everything yet, and perhaps there will be issues down the line. But it certainly seems that this is pretty simple. Of course, right when you open such a solution in VS 2010, it doesn’t look simple at all: the import wizard comes up and wants to convert your projects. After you’ve done that, VS 2008 won’t open your solution anymore. Hm… so Microsoft doesn’t want you to do this?

Looking at the project (.csproj) files, quite a lot of changes have been made. The version number has been increased, but there’s also lots of new stuff included in the various sections of the file. That looks difficult. The solution (.sln) file on the other hand has only one change made, which is the version number. Now guess which of the two is the one that causes the problem? Wrong.

The problem is in fact the solution file. Although it’s only the version number that has changed, that number is evidently used to prevent opening the solution in an older VS version. Fair enough – until you find out that it is perfectly possible, and apparently even safe, to open the vastly more complex project files in an older VS version. Go figure.

Read more: Oliver Strums weblog

Posted via email from jasper22's posterous

0 comments: