다음을 통해 공유


_Solution.TemplatePath Property

Gets the full path and name of the directory that contains templates for the specified type of project.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
ReadOnly Property TemplatePath ( _
    ProjectType As String _
) As String
string this[
    string ProjectType
] { get; }
property String^ TemplatePath[[InAttribute] String^ ProjectType] {
    String^ get ([InAttribute] String^ ProjectType);
}
abstract TemplatePath : 
        ProjectType:string -> string with get
JScript does not support indexed properties.

Parameters

  • ProjectType
    Type: System.String

    Required. A GUID that identifies the type of project, from PrjKind.

Property Value

Type: System.String
The full path and name of the directory that contains templates for the specified type of project.

Remarks

For example, TemplatePath(vsVBProjectKind) returns the path <Visual Studio root installation directory>\VBProjects.

TemplatePath is similar to ProjectItemsTemplatePath except that it is for projects rather than templates.

Examples

Sub TemplatePathExample()
   ' Open a Visual Basic solution before running this example.
   Dim soln As Solution

   ' Create a reference to the solution.
   soln = DTE.Solution

   ' List the path to the templates for the project type.
   MsgBox(soln.TemplatePath(DTE.Solution.Item(1).Kind))
End Sub

.NET Framework Security

See Also

Reference

_Solution Interface

EnvDTE Namespace