0

I have a suite of C++ programs in Visual Studio 2012. I want to provide project and solution files for Visual Studio 2013 and 2015 as well (and later versions as they come), in the appropriate subfolders.

Is there a way to get Visual Studio to leave the old project and solution files, while adding the new ones?

1 Answer 1

0

No, it will convert the older version to a new one (or at least try to) on the first open attempt. But you can easily achieve the desired effect by manually creating 3 sets of project/solution files, each corresponding to different version.

Note though it's probably not a good idea to have a SW compatible with different compilers/IDEs. There are many differences between different compilers, the changes between VS2013 and VS2015 are especially extensive. Most likely you won't be able to immediately compile without errors on both of them. Some errors you'll be able to fix to satisfy both compilers but there are some changes that aren't backwards compatible, so you'll end up with multiple #ifdefs in the code which is not desirable from design and maintenance aspects. Also, maintaining multiple versions of project/solution files will be a pain in the ass.

2
  • Come on. VS2013 vs. 2015 isn't that bad for C++. Actually, its quite ok. We're duplicating 2010 vs. 2015 in a transition phase, and it works quite well. You make it sound like the compilers are ages apart.
    – Martin Ba
    Oct 13, 2017 at 16:51
  • @MartinBa Note, my statement was about maintaining the source code compatible with several compilers, not about one-time porting from one compiler to another. Specifically, porting from VS2010 to VS2015 is probably the easy case, since features are usually added rather than deprecated. Naturally, VS2010-compliant code won't have many of the C++11 features in the first place. Take a newer codebase compiled with VS2015 which uses a much wider C++11 features subset and try compiling it with VS2010. Not to mention maintaining it compilable for both VS2010 and VS2015 Oct 13, 2017 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.