Have Solution/Project for both VS2010/2012

Started by
7 comments, last by n00by2077 11 years, 2 months ago

If you want to make a Solution and Project, for both VS2010 and VS2012, what things you have to change for all to work out without problems?

My guess:

1. Solution_vs2010.sln with Project_vs2010.vcxproj

2. Rename Solution_vs2010.sln to Solution_vs2012.sln

3. Rename Project_vs2010.vcxproj to Project_vs2012.vcxproj

4. Edit Solution_vs2012.sln and change inside Project_vs2010.vcxproj to Project_vs2012.vcxproj

5. Open Solution_vs2012.sln with VS2012 and let it make conversion

Still there must be something more to change because after opening the converted VS2012 solution/project, there is no code files added like in the 2010 project.

Thanks

Advertisement

You change nothing, that was one of the major changes from VS2010 to VS2012. If your project was based on VS2010 you could have part of your team work in VS2010 and part of your team work in VS2012. If you start a Windows 8 / WP8 project in VS2012 (can only do metro in 2012 anyway) you can't work in 2010 with it.

Missed responding to your last statement, the VS2012 interface is slightly different so you need to set things up to show the proper solution explorer and property pages, I currently have one machine that has VS2010 and another that has VS2012 and work on the same projects dpending on whether I at home or away and have no issues.

But after opening the project in 2012 I can't compile it in 2010 because it changes the compiler toolkit version used:

Configuration 'Debug|Win32': changing Platform Toolset to 'v110' (was 'v100').
Configuration 'Release|Win32': changing Platform Toolset to 'v110' (was 'v100').

If you require people to use different toolsets for working on your code base I would suggest using a utility like CMAKE or Premake to generate the solution/projects. This way you distribute the CMAKE or Premake files and people can have those build the VS/make/XCode projects that are required for what you are working on.

I modified the premake source a little while back in order to make it work with VS2012. I can probably post it online later today if you consider that as an option.

Can't be made some kind of if-condition inside project files that choose between v100 and v110 toolset if its opened by vs2010 or vs2012?

I'm not familiarized with CMAKE or Premake, so I don't know, but would be nice to have a look to this solution and see how it works, thanks :)

I'd hate to be using VS2012 and having to forgo all the good stuff added to it.

On the other hand, if you really must stay VS2010 compatible, then is it a big deal to standardize on everyone using VS2010?

I've not used 2012, but if I want to open a vs2008 solution in my vs2010 then I just open it... Visual Studio does the conversion automatically? Doesn't 2012 not do this?

I'd hate to be using VS2012 and having to forgo all the good stuff added to it.

On the other hand, if you really must stay VS2010 compatible, then is it a big deal to standardize on everyone using VS2010?

Its useful to open the project, in VS2010 or VS2012, and not need to do anything to be able to compile it, I have tested and when opened in 2012 it changes the compiler toolset version used, then if you come back and open it in VS2010 you can't compile without editing the .vcxproj file.

This topic is closed to new replies.

Advertisement