IVsSolution6.AddNewProjectFromTemplate Method

Definition

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

public:
 int AddNewProjectFromTemplate(System::String ^ szTemplatePath, Array ^ rgCustomParams, System::String ^ szTargetFramework, System::String ^ szDestinationFolder, System::String ^ szProjectName, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pParent, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ % ppNewProj);
public int AddNewProjectFromTemplate (string szTemplatePath, Array rgCustomParams, string szTargetFramework, string szDestinationFolder, string szProjectName, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pParent, out Microsoft.VisualStudio.Shell.Interop.IVsHierarchy ppNewProj);
abstract member AddNewProjectFromTemplate : string * Array * string * string * string * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * IVsHierarchy -> int
Public Function AddNewProjectFromTemplate (szTemplatePath As String, rgCustomParams As Array, szTargetFramework As String, szDestinationFolder As String, szProjectName As String, pParent As IVsHierarchy, ByRef ppNewProj As IVsHierarchy) As Integer

Parameters

szTemplatePath
String

The path of the template.

rgCustomParams
Array

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

szTargetFramework
String

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

szDestinationFolder
String

The location on disk where the project will be created.

szProjectName
String

The name of the project.

pParent
IVsHierarchy

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

ppNewProj
IVsHierarchy

Returns

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

Applies to