Scott Hanselman

DevEnv.com? - Sairama's Tip of the Day

January 29, 2003 Comment on this post [0] Posted in Web Services | Bugs
Sponsored By

Try these from the Visual Studio.NET Command Prompt:

            devenv /?
            devenv.exe /?
            devenv

devenv /? shows the options in command line.
devenv.exe /? shows the options in GUI.
devenv launches ide without options

What's happening is when you execute devenv /? (no extension, remember order of precedence BAT, COM, EXE) you are executing devenv.com. Without /?, devenv.com will just chain to devenv.exe.

Here's my which.exe output:

WHICH, Version 1.31
UNIX-like WHICH utility for Windows NT 4 / 2000 / XP
Written by Rob van der Woude
C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE\devenv.com
C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE\devenv.exe

And here's devenv.com from the Command Line:

C:\Program Files\>devenv /?

Microsoft (R) Development Environment  Version 7.00.9466.
Copyright (C) Microsoft Corp 1984-2001. All rights reserved.

Usage:
devenv  [solutionfile | projectfile | anyfile.ext]  [switches]

You can invoke devenv with a first argument to specify a solution file or
project file.  You can also invoke devenv with a first argument that is any
other kind of file that you just want to open in an editor.  When you supply a
project file, the IDE opens it in the context of a solution by looking for a
.sln file with the same base name as the project file in the same
directory as the project file.  If no such .sln file exists, then the IDE
looks for a single .sln file that references the project.  If no such single
.sln file exists, then the IDE creates an unsaved solution with a default .sln
file name that has the same base name as the project file.

Command line builds:
devenv solutionfile.sln  /build solutionconfig [ /project projectnameorfile [ /p
rojectconfig name ] ]

Available command line switches:

/build          build the specified solution configuration
/project        specifies the project to build instead of solution
                must specify /build to use /project
/projectconfig  specifies project configuration to build
                must specify /project to use /projectconfig
/out            write build output to specified file
/rebuild        like /build but forces a clean first
/clean          clean up build outputs
/deploy         build the specified solution configuration and then deploy it
/run            run the specified solution configuration
/runexit        run the specified solution configuration and then terminate
/command        executes the specified internal command line after startup
/mditabs        use tabbed documents interface
/mdi            use MDI interface
/fn             use specified font name
/fs             use specified font size
/LCID           use specified language ID
/noVSIP         disables VSIP developers license key for VSIP testing
/safemode       only default environment and services load for stability
/resetskippkgs  allow VsPackages once flagged for loading failures to
                load again

Product-specific switches:

/debugexe       Open the specified executable to be debugged. The
                remainder of the command line is passed to this
                executable as its arguments.
/useenv         Use PATH, INCLUDE, LIBPATH, and LIB environment variables
                instead of IDE paths for VC++ builds.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.