Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to have VS2010, 2008, and 2005 open and edit the same project?

Suppose I'd like to edit an Open Source project that's written in vs2005, and I have vs2010. Is there any way that any user of VS newer that 2005 can read, write, and debug the same project?

The open source project I'm considering this with is Lucene.NET

like image 324
makerofthings7 Avatar asked Nov 30 '25 17:11

makerofthings7


2 Answers

I haven't tried using projects on all three, but I've certainly managed to get 2005/2008 and 2008/2010 to work together before now.

The key is to take a copy of the solution file (.sln) but not the project files. Let Visual Studio update the project files.

Now when you open the old solution file with the old version of Visual Studio, it will still manage to load the newer project files in my experience. It will give a warning, but will work just fine - again, in my experience.

So you end up keeping two (or three) solution files, each of which needs to be updated when you add a new project, but only one project file per project. I tend to name the solution files based on the version of VS, for example:

NodaTime VS2008.sln
NodaTime VS2010.sln

Note that if you use some advanced features of the newer version of Visual Studio (e.g. a designer which isn't available in the older version) then it might well break. But in my experience of relatively simple projects (in terms of there just being code, few fancy designers) it works well. Obviously the projects have to target versions of .NET which the old versions of Visual Studio support too.

like image 60
Jon Skeet Avatar answered Dec 03 '25 22:12

Jon Skeet


This won't work, because if you open a VS2005 project in 2008 or 2010, the first thing it will do is convert the project to 2008 or 2010. You'd need to make a separate copy of the project for each version of VS that you want to use with it.

like image 33
o. nate Avatar answered Dec 03 '25 22:12

o. nate



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!