This documentation is archived and is not being maintained.

Add Existing Project Command

Adds an existing project to the current solution.

File.AddExistingProject filename


Required. The full path and project name, with extension, of the project to add to the solution.

Paths containing spaces in the filename argument must use quotation marks at their beginning and end.


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


This example adds the Visual Basic project, TestProject1, to the current solution.

>File.AddExistingProject "c:\visual studio projects\TestProject1.vbproj"

See Also

Visual Studio Commands with Arguments | Command Window | Find/Command Box | Pre-defined Visual Studio Command Aliases