分享方式:


Open project command

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. 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 an existing project or solution.

Syntax

File.OpenProject filename

Arguments

filename

Required. The full path and file name of the project or solution to open.

Note

The syntax for the filename argument requires that paths that contain spaces use quotation marks.

Remarks

Auto-completion tries to locate the correct path and file name as you type.

This command is not available while debugging.

Example

The following example opens the Visual Basic project Test1:

>File.OpenProject "C:\My Projects\Test1\Test1.vbproj"

See also