jhammond
jhammond

Reputation: 2086

Using Visual Studio 2012 IDE, but compile with Visual Studio 2008

Where I work, we are stuck on VS2008 and will be for quite some time as converting the projects/solutions and integrating them back into our build process would take significant time; we're planning on moving to 2013 at some point though. However, I use VS2012 at home and love a lot of the features in the IDE that are missing in 2008.

I've read that you can use 2012 as an IDE and build with the 2008 compiler, but I can't find details on how this is accomplished. Any ideas? If I open one of the masterbuild files in 2012, it inevitably asks to convert them to the 2012 format, which I really don't want to do.

Thoughts? Thanks!

Upvotes: 2

Views: 1662

Answers (3)

ChiefTwoPencils
ChiefTwoPencils

Reputation: 13940

Yes it is possible as can be found on the Visual Studio site. However, I believe it will only give you options of the versions you have currently installed on the machine in question.

Here are the steps as laid out in the link, provided here to ensure the information link does not get broken:

(authored and published by Microsoft)

To change the target Framework

  1. In Visual Studio, in Solution Explorer, open the shortcut menu for your project and then choose Unload project. This unloads the project (.vcxproj) file for your project. Note: A C++ project cannot be loaded while the project file is being modified in Visual Studio. However, you can use another editor such as Notepad to modify the project file while the project is loaded in Visual Studio. Visual Studio will detect that the project file has changed and prompt you to reload the project.

  2. On the menu bar, select File, Open, File. In the Open File dialog box, navigate to your project folder, and then open the project (.vcxproj) file.

  3. In the project file, locate the entry for the target Framework version. For example, if your project is designed to use the .NET Framework 4.5, locate v4.5 in the element of the element. If the element isn't present, your project doesn't use the .NET Framework and no change is required.

  4. Change the value to the Framework version you want.

  5. Save the changes and close the editor.

  6. In Solution Explorer, open the shortcut menu for your project and then choose Reload Project.

  7. In Solution Explorer, open the shortcut menu for your project and then choose Properties. In the Property Pages dialog box, in the left pane, expand Common Properties and then select Framework and References. Verify that Targeted framework shows the new Framework version.

To change the project toolset

  1. In Visual Studio, in Solution Explorer, open the shortcut menu for your project and then choose Properties.

  2. In the Property Pages dialog box, open the Configuration drop-down list and then select All Configurations.

  3. In the left pane of the dialog box, expand Configuration Properties and then select General.

  4. In the right pane, select Platform Toolset and then select the toolset you want from the drop-down list. For example, if you want to compile with the Visual Studio 2010 toolset, select Visual Studio 2010 (v100).

  5. Choose the OK button.

Upvotes: 2

Rastaban
Rastaban

Reputation: 901

From Visual Studio 2012 Compatibility page on MSDN

Some solutions, projects, files, and other assets that you created in Visual Studio 2010 Service Pack 1 (SP1) will run without modification in Visual Studio 2012, but others have to be upgraded.

If your original project is 2008 then you won't be able to use it in 2012, sorry.

Upvotes: 0

Naszta
Naszta

Reputation: 7744

Try to use CMake. It could manage out of source build. You could create a VS2012 for edit and another VS2008 based for compiling. The source will be common.

Upvotes: 0

Related Questions