Jonas Stawski

Everything .NET and More

Use Visual Studio 2008 and Visual Studio 2005 for the Same Project

You have a 2.0/3.0 .NET application that you have been working for a while, but you do not want to have VS 2005 installed as well as 2008. The problem is the other members of your team do not want to get rid of 2005 and converting the application to 3.5 is not an option. What do you do?

With previous versions of Visual Studio the developer had to use the version of the .NET framework that was tied to Visual Studio. So if you wanted to work with VS 2005 the application was going to compile for .NET 2.0/3.0, VS 2003 = .NET 1.1, and VS 2002 = .NET 1.0. With VS 2008 you can select which version of the framework you want to use. This is a great new feature since this will let the developers use VS 2008 while others in the same team are still using 2005. Bellow are the steps to create a Visual Studio 2008 solution file to be able to work with both versions:

DISCLAIMER: this worked for my project (VS 2005) and I'm posting this to help others that might be in a similar situation. I do not guarantee that this will work for every single case so do this at your own risk.

1. Copy and paste the VS 2005 solution file (.sln) to the same folder and rename it with a descriptive name indicating that solution is for 2008.

2. Edit the new solution file with notepad and change the following lines:
    a. Microsoft Visual Studio Solution File, Format Version 9.00 => Microsoft Visual Studio Solution File, Format Version 10.00
    b. # Visual Studio 2005 => # Visual Studio 2008

3. Open the 2008 solution which will automatically use Visual Studio 2008. The other team members using 2005 will open the solution using the original solution file while members using the VS 2008 will use the new solution file.

4. Follow the Wizard that comes up.

5. Right click on each project - properties and make sure the Target Framework is still pointing to the correct framework: 1.0/1.1/2.0/3.0. If you target   framework 3.5 and you add 3.5 code, such as LINQ, the other team members using VS 2005 will not be able to compile.

Happy Programming!

Comments (1) -

Hey Now Jonas,
Good Info, The target framework drop down is a really nice feature of VS'08.
Thx 4 the info,
Catto

Reply

Add comment

biuquote
Loading