views:

79

answers:

4

Sometimes I do consultancy work for companies that are still using Visual Studio 2008, but I have 2010 installed.

I assumed (yes, assumption is the mother, father brother and sister of all f-ups!) that I would be able to open 2008 projects in 2010 without having to upgrade them. However, it appears that this is not the case?

Unfortunately, choosing to compile for .NET 3.5 wont solve this problem as the original developers will need to continue to develop the same projects in 2008

+3  A: 

You can't leave a project in VS2008 format and there's no automatic way to downgrade a VS2010 project to a VS2008 project.

There are a number of differences to the files:

<Project ToolsVersion="3.5" ...

becomes:

<Project ToolsVersion="4.0" ...

The <ProductVersion> changes from 9.0.30729 to 8.0.30703 (though I am only using the 2010 Express editions at the moment so this might be different for the full version).

Alternatively you could upgrade the project on your machine and just copy back the source files. However, this would require more work if you added/removed any project files as this would have to be repeated on a machine running VS2008.

ChrisF
Using SVN to copy source files only is a **good** idea! Thanks
Jimbo
+1  A: 

Unfortunately, I don't think there is a backward compatibility option for VS2010.

What I have been doing is upgrading the VS2008 project to 2010, and leaving backup copies of the project and solution files. I then rename all of the upgraded files to project_name_vs2010.* and rename the backup files back to the original name, since I'm the only developer using 2010. The downside is that any changes you make to the project or solution need to be redone inside of VS2008 (or manually edit the XML if you don't have a copy of 2008) before you push your changes. The positive is that all source files will work in both versions thanks to VS2010's multi-targeting. You'll definitely need to keep the compiler setting to 3.5 in order to keep all the source files compatible.

bsruth
A: 

I faced this same issue with 2005 to 2008. If you aren't using anything that is not supported in the earlier version, such as .Net 4, then all you need to do is revert changes VS makes to the .proj file to then open it again in 2008. This is very annoying to have to do repeatedly but I think it is basically your only option.

Andrew Hubbs
A: 

You Can't.

However, you can have multiple solutions (one for 2010, one for 2008) which each reference the projects. The project files themselves don't have to change.

If you go this route, you have to make sure the project targets are no higher than .Net 3.5.

Chris Lively