Share via


/Edit (devenv.exe)

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Opens the specified file in an existing instance of Visual Studio.

Syntax

Devenv /edit [file1[ file2]]

Arguments

file1 Optional. The file to open in an existing instance of Visual Studio. If no instance of Visual Studio exists, a new instance is created with a simplified window layout, and file1 is opened in the new instance.

file2 Optional. One or more additional files to open in the existing instance of Visual Studio.

Remarks

If no file is specified and there is an existing instance of Visual Studio, the existing instance of Visual Studio receives focus. If no file is specified and there is no existing instance of Visual Studio, a new instance of Visual Studio is created with a simplified window layout.

If the existing instance of Visual Studio is in a modal state, for example, if the Options dialog box is open, the file will open in the existing instance when Visual Studio exits the modal state.

Example

This example opens the file MyFile.cs in an existing instance of Visual Studio or opens the file in a new instance of Visual Studio if one does not already exist.

devenv /edit MyFile.cs

See Also

Devenv Command Line Switches