Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
How to Convert VS2010 solutions to VS2008?
Posted

Visual Studio 2010 has been my default IDE now. It has a bunch of cool features to work with. But unfortunately some of my colleagues are not comfortable in migrating to VS2010 as it is in beta stages or either they don’t want to have 2 instances of VS installation which takes up their storage.
But I couldn’t just leave VS2010. Not only because of its new features but also due to the fact that it has to be the default IDE later on anyways and VS team needs to find as much bugs and errors and fix them all by the time it RTMs. (VSTeam actually really does listen to your feedback. They fixed all my 10 bugs I reported in VS2010 Beta 1. So for the betterment I would like you to try updating to VS2010 and find as much bug as you can and send them feedbacks.)
Now lets get to the real thing of downgrading. I will not be explaining on how to upgrade from VS2008 to VS2010, because it already does automatically. But I will rather be going through on how to do the opposite.
1. Make a backup copy of your .sln file. It will result in two solutions. One for VS2010 and the other for VS2008. The .csproj files doesn’t need to be modified at all.
2. Open one of the .sln file in a text editor (notepad is more than fine).


You will see somewhat like the above in the selected text, where version is 11.00 and visual studio version is 2010.
3. Edit the version numbers. Now change it 11.00 to 10.00 and 2010 to 2008.


Then save it. Rename your solution files to solutionname-2008.sln and solutionname-2010.sln or something like that if you want.
Now you can open it in older version’s of Visual Studio.
But since my VS2010 is my default IDE, I didn’t even install VS2008 rather installed only VS2008 C# Express versions. You can open it from VS2008 C# Express Versions, but test projects will not be loaded and solution folders will not work. Besides that everything will most probably work fine.
Note: Any updates like adding new file in VS2010 or VS2008 is also maintained in both solutions, because the file structures are stored in .csproj file which is by nature VS version independent.
And since my projects are at max in .NET v3.5, it all works fine in VS2008. I did land up with some warning errors during compilation under VS2008.
Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
So since it goes back to 3.5 it still works fine. You can just ignore the warning.
 
Share this answer
 
Comments
Albert Holguin 7-Jun-11 20:23pm    
VS2010 is not in beta... as a matter of fact, i'm pretty sure the first service pack is already out... regardless, there's a lot of people including myself that still haven't taken the plunge (and they broke IntelliSense for C++/CLI and don't intend to fix it)
Try this Solution Converter: SolutionConverter[^].

—SA
 
Share this answer
 
Comments
Albert Holguin 7-Jun-11 20:25pm    
I'd be highly skeptical that program would work correctly (having transferred a lot of project by hand)... but for a downgrade from versions that are contiguous, it'll probably work
Sergey Alexandrovich Kryukov 7-Jun-11 22:25pm    
Thank you, Albert.
You see, I used another CodeProject article to downgrade from 2008 to 2005 - it did not do 100% of work, so I had to add manual adjustments anyway. Did not try this one yet. But the problem is relatively simple, I could fix it or rather write my own.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900