Sign in to follow this  

How do developers put VS2005, VS2008, and VS2010 solutions together in one folder?

This topic is 2384 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I do not understand how do they do it. How do they put 3 different Visual Studios versions in 1 folder?

When I tried using both Visual Studio 2010 and Visual Studio 2008 together, I can't seem to mix both of them together without breaking anything. And they both would put these solutions in different folders, so if I manually move them to one folder, they would overwrite each other and wouldn't let either Visual Studios to open the project and debug the executable.

So, where can I find this tutorial or guide, or something.[url="http://www.google.com/#sclient=psy&hl=en&source=hp&q=Visual+Studio+2010+and+Visual+Studio+2008+projects+side+by+side+-installation&aq=f&aqi=&aql=&oq=&pbx=1&bav=on.2,or.r_gc.r_pw.&fp=59d92e132c7675e7&biw=1240&bih=927"]This Google search doesn't help much.[/url] :(


Like this:


[img]http://i1207.photobucket.com/albums/bb464/tom_mai78101/Capture-2.png[/img]

Share this post


Link to post
Share on other sites
[quote name='AndyEsser' timestamp='1306768899' post='4817532']
Forgive me for what might seem like a stupid question, but why do you need to use multiple versions of VS for the same project?
[/quote]

At school, the computers use VS 2005 and VS 2008. They have not been licensed to use VS 2010. My project was originally created in VS 2010, and I don't want to keep my development on my computer. I wanted to do some development at school and in my dormitory.

So, I thought about how developers use this method to obtain backward-compatibility with older versions of VS, and now I'm curious about how they do it.

Share this post


Link to post
Share on other sites
There are several options.

One option is to maintain multiple visual studio solution files. When a file is added, you need to open each of the three and add the file to any configurations you want.

Another option is to have your build tools keep them for you. Programs like CMake can generate project files.

Or if you prefer to build such a tool yourself it isn't difficult; the files are XML files. It is straightforward to build a small tool that scans the directory trees of your project and produces vcproj or csproj or other project files for each format you want to support. You need to have a valid file from each version of the IDE to base it on, but the process is not difficult.

Share this post


Link to post
Share on other sites
So, you can't create a new solution in VS 2005 in folder A, then create a new solution in VS 2008 while using the same folder A, to try to get each versions of VS to think that the solution folder itself is completely new?

Share this post


Link to post
Share on other sites
Theres nothing to stop each version of VC using the same directory stucture, just give the solutions and projects unique names so that the solution and project files dont clash (may also be useful to make them use different intermediate directories, and different output paths). Use the add existing files to add the source files and such.

Share this post


Link to post
Share on other sites
There's actually really simple way. First create the project(s) as part of a VS2005 solution.
Then open the solution in VS2008 and allow it to upgrade the projects on its own. Fix any compile errors such that the project(s) compile under both compilers. Add proprocessor macros in certain areas if necessary to make some different code depending upon the compiler (preferably after trying other options).
Then open the VS2008 project under 2010 and allowallow it to upgrade the projects again. Fix any compile errors such that the project(s) compile under any of the three compilers.
Viola, now you have a bunch of source code that can be compiled under any of the three compilers.

If you want to go in the other direction, then take your VS2010 project and create a new empty VS2008 project and manually add all the same source files etc.
If it we're me, I'd also make a code::blocks project of the same code, and perhaps more. The principle is the same.

Or, if you've using visual studio long enough, then you would be comfortable editing the project and/or solution files directly using notepad etc, though that is seldom necessary.

Share this post


Link to post
Share on other sites
Thank you, everyone.

When I tried making a VS2008 solution file of my VS2010 solution file, although I just need to edit the headers and the vcxproj --> vcproj renaming, I still don't understand what else would cause the VS2008 to not able to open the projects.

If you come across this problem, how would you fix this?


Share this post


Link to post
Share on other sites
They totally changed the project file format int VS2010, hence the different file extension. You can't just change the file extension when going between VS2010 and VS2008.
As I said, to go back to VS2008 you need to create a new empty project and add all of the same files to it etc.
[i]It's going forwards a version that is easy.[/i]

Share this post


Link to post
Share on other sites
[quote name='iMalc' timestamp='1307124690' post='4819159']
They totally changed the project file format int VS2010, hence the different file extension. You can't just change the file extension when going between VS2010 and VS2008.
As I said, to go back to VS2008 you need to create a new empty project and add all of the same files to it etc.
[i]It's going forwards a version that is easy.[/i]
[/quote]


Oh... Dang. Thank you!

Share this post


Link to post
Share on other sites

This topic is 2384 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this