5

Click here to load reader

Devenv command line

  • Upload
    mait

  • View
    4.889

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Devenv command line

Visual Studio Command Line Tool

Wednesday 13 July 2011

devenv

Muthu Swamy S

Page 2: Devenv command line

Visual Studio Command Line Tool

1 Posted on http://virams.wordpress.com

Visual Studio Command Line

The first argument for devenv is usually a solution file or project file.

You can also use any other file as the first argument if you want to have the file open automatically in an

editor. When you enter a project file, the IDE looks for an .sln file with the same base name as the

project file in the parent directory for 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.

1. Build

2. Clean

3. Command

4. DebugExe

5. Deploy

6. Edit

7. LCID

8. Log

9. Out

10. Project

11. ProjectConfig

12. Rebuild

13. ResetAddin

14. InstallVSTemplates

15. ResetSettings

16. ResetSkipPkgs

17. Run

18. Runexit

19. SafeMode

20. Setup

21. Upgrade

22. UseEnv

NOTES

1. For build-related tasks, it is now recommended that you use MSBuild instead of devenv.

For more information, see MSBuild Command Line Reference

2. You must run devenv as an adminstrator in order to use the /Setup (devenv.exe) and

/InstallVSTemplates (devenv.exe) switches. For more information, see User Permissions

and Visual Studio

Usage:

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

Page 3: Devenv command line

Visual Studio Command Line Tool

2 Posted on http://virams.wordpress.com

Available command line switches:

Command line Description

/Command Starts the IDE and executes the specified command.

/DebugExe Loads a Visual C++ executable under the control of the debugger. This switch is not available for Visual Basic or Visual C# executables.

/LCID Sets the default language for the IDE. If the specified language is not included in your installation of Visual Studio, this setting will be ignored.

/Log Starts Visual Studio and logs all activity to the log file.

/Run or /r Compiles and runs the specified solution.

/Runexit Compiles and runs the specified solution, minimizes the IDE when the solution is run, and closes the IDE after the solution has finished running.

/UseEnv Causes the IDE to use PATH, INCLUDE, and LIB environment variables for Visual C++ compilation instead of the settings specified in the VC++ Directories section of Projects options in the Options dialog box.

/Edit Opens the specified files in a running instance of this application. If there are no running instances, it will start a new instance with a simplified window layout.

/ResetAddin Starts an instance of the Visual Studio IDE without loading the specified Add-in.

/SafeMode Starts Visual Studio in safe mode, and loads only the default environment and services, and shipped versions of third-party packages.

/ResetSkipPkgs Clears all SkipLoading tags that have been added to VSPackages by users who want to avoid loading problem VSPackages.

/Setup Forces Visual Studio to merge resource metadata that describes menus, toolbars, and command groups, from all VSPackages available.

/NoVSIP Disables the VSIP developer's license key for VSIP testing.

Page 4: Devenv command line

Visual Studio Command Line Tool

3 Posted on http://virams.wordpress.com

Application Based Options

Use the following command line switches to perform the described task. These command-line switches do not display the IDE.

Command line Description Example

/? Displays help for devenv switches in the Command Prompt window.

Devenv /?

/Build Builds the specified solution or project according to the configuration of the specified solution.

Devenv myproj.csproj /build

/Clean Deletes any files created by the build command, without affecting source files.

Devenv myproj.csproj /clean

/Deploy Builds the solution, along with files necessary for deployment, according to the solutions configuration.

Devenv myproj.csproj /deploy

/InstallVSTemplates

Registers project or item templates that are located in <VisualStudioInstallDir>\Common7\IDE\ProjectTemplates or <VisualStudioInstallDir>\Common7\IDE\ItemTemplates so that they can be accessed through the New Project and Add New Item dialog boxes.

Devenv /InstallVSTemplates

/Out Lets you specify a file to receive errors when you build.

Devenv myproj.csproj /build /out log.txt

/Project The project to build, clean, or deploy. You can use this switch only if you have also supplied the /build, /rebuild, /clean, or /deploy switch.

Devenv myproj.csproj /ProjectConfig Debug

/ProjectConfig Specifies the project configuration to build or deploy. You can use this switch only if you have also supplied the /project switch.

devenv MySolution.sln /build Debug

Page 5: Devenv command line

Visual Studio Command Line Tool

4 Posted on http://virams.wordpress.com

/project MyProject.csproj /projectconfig Debug

/Rebuild Cleans and then builds the specified solution or project according to the configuration of the specified solution.

devenv MySolution.sln /Rebuild Debug /project MyProject.csproj /projectconfig Debug

/Upgrade Upgrades the specified solution file and all its project files, or the specified project file, to the current Visual Studio formats for these files.

devenv MyProject.sln /upgrade

/ResetSettings Restores Visual Studio default settings. Optionally resets the settings to the specified .vssettings file.

Devenv.exe /ResetSettings