次の方法で共有


_Solution.TemplatePath プロパティ

指定された種類のプロジェクトのテンプレートを含むディレクトリの完全パスと名前を取得します。

名前空間:  EnvDTE
アセンブリ:  EnvDTE (EnvDTE.dll 内)

構文

'宣言
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 では、インデックス付きプロパティはサポートされません。

パラメーター

  • ProjectType
    型 : String

    必須。 PrjKind からの、プロジェクトの種類を示す GUID。

プロパティ値

型 : String
指定された種類のプロジェクトのテンプレートを含むディレクトリの完全パスと名前。

解説

たとえば、TemplatePath(vsVBProjectKind) は、パス <Visual Studio root installation directory>\VBProjects を返します。

TemplatePathProjectItemsTemplatePath に似ていますが、テンプレートではなくプロジェクトに対して使います。

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 セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

_Solution インターフェイス

EnvDTE 名前空間