Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

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

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

  • Comments 3

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:

 

  • The documentation kinda sucks actually.  Let's say you have 3 projects in a solution. You wanna build just one, and it's not dependent on the other two. I haven't found a way to build just the one.  It either builds all 3, or gives me the /? output.  

    And the parameter listing behaves inconsistently.  In one of my sln's, I can't devenv 1.sln /Build "Release" while I can do devenv 2.sln /Build "Release" in the other solution. I have to strip off the "Release" to make it work, which means it only builds in debug.

    And how can you build a web project in "release" mode since the web.config has Debug=true for developers, but I can't change it when I want to build in release mode without checking out the web.config, re-building it, and then either checking in (bad for development) or undoing the checkout (so now I gotta check it back out when I'm building my next build).

    Also, if you wanna do a publish of a website and precompile, I haven't found the way to do that neither.

    Also, if doing a clean on a web project, why doesn't it do anything? I look inside the bin directory after a clean, and it doesn't clean it out. If a reference changed in a different solution, it doesn't copy the newly built reference in.

    Then when you try to add it back in, it wants to check it out, even if it's not in any source control. And where is the reference pointing too?  You can't tell.  there's no hintpath since the proj file went away. Yeah, this has nothing to do with devenv, but still, VS2005 is p*ss*ng me off...
  • Hi Marc - I'm sorry for the frustration you have experienced with these command line switches.  I don't have a lot of experience with command line builds in Visual Studio, so I don't really have any helpful suggestions to offer you.  You may want to check out the MSBuild reference documentation for more ideas about how to configure build options.  You can find that at http://msdn2.microsoft.com/en-US/library/ms164311.aspx.

  • The person who writes "I don't have a lot of experience with command line builds"   is writing articles about CLI switches???

Page 1 of 1 (3 items)
Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post