Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

_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)
string this[
	string ProjectType
] { get; }

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.

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.

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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.