Export (0) Print
Expand All
ID
Top
Expand Minimize

TemplatePath Property

Visual Studio .NET 2003

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

[Visual Basic .NET]
Public ReadOnly Property TemplatePath( _
   ByVal ProjectType As String _
) As String
[Visual Basic 6]
Property Get TemplatePath( _
   ByVal ProjectType As String _
) As String
[C++]
HRESULT __stdcall get_TemplatePath(
   BSTR ProjectType,
   /* [out, retval] */ BSTR* retVal
);
[C#]
string TemplatePath(
   string ProjectType
) {get;}
[JScript .NET]
public function get TemplatePath(
   ProjectType : String
) : String

Parameters

ProjectType
Required. A GUID that identifies the 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.

Example

Sub TemplatePathExample()
   ' Open a Visual Basic .NET 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

See Also

AddFromTemplate Method (Solution Object)

Applies To: Solution Object

Show:
© 2014 Microsoft