2
Vote

In VS2008, VSCmdShell opens cmd.exe with the VS2005 environment

description

I have both VS2005 and VS2008 installed, and VSCmdShell works fine in both, except the cmd.exe prompt in VS2008 loads the VS2005 environment, instead of the VS2008 environment. This appears to be hardcoded (I've had a look at the source code).
 
A solution could be based on the fact that the DTE object exposes a member, Version, which should return "8.0" when running under VS2005 and "9.0" when running under VS2008. This could be used to load the correct environment depending on Visual Studio version.

comments