The Visual Studio 2010 IDE in current state not good for C++ developers. It is painfully slow and when it runs it does not allow anything to run with it. Visual Studio 2008 IDE is fast simple and much more responsive.
VS 2010 has many intresting features, better Windows 7 support and faster compilation using multi-core CPUs. So I began to think how to use the VS 2008 IDE with VS 2010 compiler and while searching I found the required information but with different compiler:
Visual Studio IDE has a convenient switch: /useenv. The documentation
for the switch states the following:
“Starts Visual Studio and uses the environment variables for PATH, INCLUDE, LIBS, and LIBPATH in the VC++ Directories dialog box.”
Combined with the vcvars32.bat file that Visual Studio installations traditionally create, this switch gives us the ability to run any Visual Studio IDE with any version of the compiler and support tools.
For convience, I have a batch file that first sets up the environment for Visual C++ 6.0 and then starts Visual Studio 2008 with the /useenv switch:
<code>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
start "" "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /useenv </code>
Use ‘start’ instead of directly running devenv.exe in order to immediately close the window that opens for the batch file. ‘Start’ command will run devenv.exe asynchronously and the process started for the batch file will exit. Notice the empty quotes after start they should be like that only
Wrapping It All Up
Depending on your project’s requirements and options, you might need to change some more options.