IVsSolution6::AddNewProjectFromTemplate Method (String^, Array^, String^, String^, String^, IVsHierarchy^, IVsHierarchy^)

 

Adds a new project to the solution, using a project template.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.12.1.DesignTime (in Microsoft.VisualStudio.Shell.Interop.12.1.DesignTime.dll)

int AddNewProjectFromTemplate(
	String^ szTemplatePath,
	Array^ rgCustomParams,
	String^ szTargetFramework,
	String^ szDestinationFolder,
	String^ szProjectName,
	IVsHierarchy^ pParent,
	[OutAttribute] IVsHierarchy^% ppNewProj
)

Parameters

szTemplatePath
Type: System::String^

The path of the template.

rgCustomParams
Type: System::Array^

[optional] Custom keywords to pass to the template engine. Strings must have the form "keyword=value".

szTargetFramework
Type: System::String^

[optional] The target framework (if applicable) for template selection.

szDestinationFolder
Type: System::String^

The location on disk where the project will be created.

szProjectName
Type: System::String^

The name of the project.

pParent
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

[optional] The parent project under which to create the new project. This can be solution folder or any project that implements IVsParentProject3.

ppNewProj
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

Return Value

Type: System::Int32

The newly created project. If the template creates more than one project, this one is the first one created.

Return to top
Show: