Visual Studio 2005 IDE (devenv.exe) command line switches

There is some good documentation available on MSDN that describes various command line switches that are supported by the Visual Studio 2005 IDE (devenv.exe). Many of these switches have existed in previous versions of Visual Studio.

However, I wanted to draw your attention to a new switch that was added in Visual Studio 2005 - the /log switch. This switch allows you to run Visual Studio and cause it to generate a log file of the various activities that it does behind the scenes. This switch can be useful in debugging problems where the IDE crashes when you try to launch it, when you encounter package load failure error messages, or when you see various other errors while using various Visual Studio features.

The syntax for using this switch is the following:

devenv.exe /log <full path to log file>

The documentation currently states that the log file path is required and that it must exist before running this command line, but I have found this is not true in my experience. I have seen this log created if it does not exist. Also, if you do not pass in a path, Visual Studio 2005 will use the file named %USERPROFILE%\Application Data\Microsoft\VisualStudio\8.0\activitylog.xml by default.

You can find devenv.exe in the C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ folder (if you do a default installation of Visual Studio 2005 and your OS is on the C drive - you'll have to adjust the path as appropriate on your system).

Also note, the file devenv.exe is the name of the IDE executable on the main Visual Studio editions (Professional, Team System, etc). For the Express Editions, each IDE executable has a different name: