开发者

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

开发者 https://www.devze.com 2023-01-23 08:08 出处:网络
Suppose I\'d like to edit an Open Source project tha开发者_JAVA技巧t\'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 pr

Suppose I'd like to edit an Open Source project tha开发者_JAVA技巧t'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


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.


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.


It won't work because of the conversion process. However, the changes in the .sln and .csproj files between VS2005, VS2008 and VS2010 are very minor. You can either keep a separate copy of them or make the changes manually.

More information on the conversion process here.

Depending on how complex the solution and projects are, it might be worth it.


Maybe try Visual Studio Express 2005, I believe that it can co-exist with other full versions of visual studio, but I don't know Lucene.NET so not sure if it will open\compile with that version.

0

精彩评论

暂无评论...
验证码 换一张
取 消