Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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)
Syntax
'Declaration
Function AddNewProjectFromTemplate ( _
    szTemplatePath As String, _
    rgCustomParams As Array, _
    szTargetFramework As String, _
    szDestinationFolder As String, _
    szProjectName As String, _
    pParent As IVsHierarchy, _
    <OutAttribute> ByRef ppNewProj As IVsHierarchy _
) As Integer
int AddNewProjectFromTemplate(
    string szTemplatePath,
    Array rgCustomParams,
    string szTargetFramework,
    string szDestinationFolder,
    string szProjectName,
    IVsHierarchy pParent,
    out IVsHierarchy ppNewProj
)
int AddNewProjectFromTemplate(
    [InAttribute] String^ szTemplatePath, 
    [InAttribute] Array^ rgCustomParams, 
    [InAttribute] String^ szTargetFramework, 
    [InAttribute] String^ szDestinationFolder, 
    [InAttribute] String^ szProjectName, 
    [InAttribute] IVsHierarchy^ pParent, 
    [OutAttribute] IVsHierarchy^% ppNewProj
)
abstract AddNewProjectFromTemplate : 
        szTemplatePath:string * 
        rgCustomParams:Array * 
        szTargetFramework:string * 
        szDestinationFolder:string * 
        szProjectName:string * 
        pParent:IVsHierarchy * 
        ppNewProj:IVsHierarchy byref -> int
function AddNewProjectFromTemplate(
    szTemplatePath : String, 
    rgCustomParams : Array, 
    szTargetFramework : String, 
    szDestinationFolder : String, 
    szProjectName : String, 
    pParent : IVsHierarchy, 
    ppNewProj : IVsHierarchy
) : int
Parameters
- szTemplatePath 
 Type: String- The path of the template. 
- rgCustomParams 
 Type: Array- [optional] Custom keywords to pass to the template engine. Strings must have the form "keyword=value". 
- szTargetFramework 
 Type: String- [optional] The target framework (if applicable) for template selection. 
- szDestinationFolder 
 Type: String- The location on disk where the project will be created. 
- szProjectName 
 Type: 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: Int32
The newly created project. If the template creates more than one project, this one is the first one created.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.