Devenv enables you to set various options of the integrated development environment (IDE) and compile, generate, and debug projects from the command line. Use these switches to run the IDE from a script or. BAT file (such as a script generated every night), or start the IDE with a specific configuration.
Prompt to enable Visual Studio to start and automatically open a single file in the editor, enter the complete path and file name after you type devenv with no additional switch or parameters. For exampledevenv "c:\test.cpp"
.
Devenv switch syntax
The syntax of the devenv switch is similar to that of other DOS command line utilities. The devenv command line switch is used for devenv.com and devenv.exe. By defaultdevenv
The switch is passed to devenv.com. Using devenv.com provides the correct transfer of output using standard system streams (such as stdout and stderr) and the correct I/O redirection used to capture output (such as in. txt files. To pass the switch to devenv.exe, you must specifydevenv.exe
. All the syntax rules listed below apply to devenv.com.
Prompt Switch/?
The "command prompt" window displays the switches that can be used for devenv and their usage instructions.
The following syntax rules apply to all switches and parameters:
- The command line syntax must be
devenv
Start. For example/fn
Switch, enter the following content:devenv /fn arial
- The switch is case insensitive.
- The first parameter is usually the solution file name.
- Devenv performs the following operations when the project file name is provided instead of the solution file name:
- Search the solution file with the same name in the parent directory of the project file. For example, if myproject1.vbproj is specified, devenv searches for myproject1.sln.
- In the parent directory of the project file, search for a single solution file with a reference to the project file. If multiple solutions reference the project file or no solution references the project file, a temporary solution with the same name as the project file is created.
- The file path and file name that contain spaces must be enclosed in double quotation marks.
- When specifying the file path, it must contain letters of the drive.
- Separate multiple switches and parameters with one blank character.
- Devenv does not accept the wildcard or other pattern matching syntax.
Devenv Switch
Use the following command line switch to display the integrated development environment and execute the task described.
Command Line Switch |
Description |
/Lcid or/L |
Set the default language for the IDE. |
/FN |
Change the system font of the IDE. |
/Fs |
Change the system font size of the IDE. |
/Run or/R |
Compile and run the specified solution. |
/Runexit |
Compile and run the specified solution, minimize the IDE when running the solution, and close the IDE after the solution is completed. |
/MDI |
Open the IDE in Multiple Document Interface (MDI) mode. In addition, the "MDI environment" option in the "options" dialog box is selected. For more information, see "options" dialog box-> "environment"-> "General ". |
/Mditabs |
Open the IDE in MDI mode and enable the tabs on the document. |
/Command |
Start the IDE and run the specified command. |
/Migratesettings |
Open the IDE and copy some "options" dialog box from the previous version to the updated version. |
/Debugexe |
Load the Visual C ++ executable file under the control of the debugger. This switch cannot be used for Visual Basic or Visual C # executable files. For more information, see enable the debugger automatically. |
/Useenv |
Enable the integrated development environment (IDE) to use path, include, and Lib environment variables for Visual C ++ compilation, instead of using the settings specified in the "VC ++ directory" section of the "project" option in the "options" dialog box. For more information, see generating the setting path and environment variables for the command line. |
Use the following command line to execute the described task. These command line switches do not display the integrated development environment.
Command Line Switch |
Description |
/Build |
Generates a specified solution or project based on the specified solution configuration. |
/Rebuild |
Clears and generates the specified solution or project based on the specified solution configuration. |
/Project |
The project to be generated, cleared, or deployed. This switch can be used only when the/build,/rebuild,/clean, or/deploy switch is provided. |
/Projectconfig |
Specifies the project configuration to be generated or deployed. You can use this switch only when the/Project switch is provided. |
/Clean |
Clears the specified solution or project based on the specified solution configuration. |
/Deploy |
As a result, deployment is performed after the specified solution configuration is generated (or re-generated. |
/Out |
Allows the specified file to receive Errors During generation. |
/Nologo |
Prevent copyright information from being displayed. |
/? |
The help of the devenv switch is displayed in the "command prompt" window. |
The following switches can only be used by companies involved in Visual Studio. NET Integration Program (vsip.
Command Line Switch |
Description |
/Novsip |
Disable the license key of a vsip developer on the developer workstation. |
/Safemode |
Start Visual Studio in safe mode and load only the default environment and services. |
/Resetskippkgs |
Clear all skiploading tags added to vspackages to avoid loading problematic vspackages. |