Context Parameters

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Context Parameters.

In the Visual Studio integrated development environment (IDE), you can add wizards to the New Project, Add New Item, or Add Sub Project dialog boxes. The added wizards are available on the File menu or by right-clicking a project in Solution Explorer. The IDE passes context parameters to the implementation of the wizard. The context parameters define the state of the project when the IDE calls the wizard.

The IDE starts wizards by setting the VSADDITEMOP_RUNWIZARD flag in the IDE's call to the AddItem method for the project. When set, the project must cause the IVsExtensibility::RunWizardFile method to be executed by using the registered wizard name or GUID and other context parameters that the IDE passes to it.

ParameterDescription
WizardTypeRegistered wizard type (vsWizardNewProject) or the GUID that indicates the type of wizard. In the Visual Studio SDK implementation, the GUID for the wizard is {0F90E1D0-4999-11D1-B6D1-00A0C90F2744}.
ProjectNameA string that is the unique Visual Studio project name.
LocalDirectoryLocal location of working project files.
InstallationDirectoryDirectory path of the Visual Studio is installation.
FExclusiveBoolean flag which indicates that the project should close open solutions.
SolutionNameName of the solution file without the directory portion or the .sln extension. The .suo file name is also created by using SolutionName. When this argument is not an empty string, the wizard uses Create before adding the project with AddFromTemplate. If this name is an empty string, use AddFromTemplate without calling Create.
SilentBoolean that indicates whether the wizard should run silently as if Finish were clicked (TRUE).
ParameterDescription
WizardTypeRegistered wizard type (vsWizardAddItem) or the GUID that indicates the type of wizard. In the Visual Studio SDK implementation, the GUID for the wizard is {0F90E1D1-4999-11D1-B6D1-00A0C90F2744}.
ProjectNameA string that is the unique Visual Studio project name.
ProjectItemsLocal location that contains working project files.
ItemNameName of the item that is to be added. This name is either the default file name or the file name that the user types from the Add Items dialog box. The name is based on the flags that are set in the .vsdir file. The name can be a null value.
InstallationDirectoryDirectory path of the Visual Studio is installation.
SilentBoolean that indicates whether the wizard should run silently as if Finish were clicked (TRUE).
ParameterDescription
WizardTypeRegistered wizard type (vsWizardAddSubProject) or the GUID that indicates the type of wizard. In the Visual Studio SDK implementation, the GUID for the wizard is {0F90E1D2-4999-11D1-B6D1-00A0C90F2744}.
ProjectNameA string that is the unique Visual Studio project name.
ProjectItemsPointer to the ProjectItems collection on which the wizard operates. This pointer is passed to the wizard based on the project hierarchy selection. A user typically selects a folder in which to put the item and then calls the project's Add Item dialog box.
LocalDirectoryLocal location of working project files.
ItemNameName of the item that is to be added. This name is either the default file name or the file name that the user types from the Add Items dialog box. The name is based on the flags that are set in the .vsdir file. The name can be a null value.
InstallationDirectoryDirectory path of the Visual Studio is installation.
SilentBoolean that indicates whether the wizard should run silently as if Finish were clicked (TRUE).

IVsProject
IVsProject2
Custom Parameters
Wizards
Wizard (.Vsz) File
Context Parameters for Launching Wizards

Show: