次の方法で共有


VCProjectEngine.Platforms プロパティ

プロジェクト エンジンのプラットフォームのコレクションを取得します。

名前空間:  Microsoft.VisualStudio.VCProjectEngine
アセンブリ:  Microsoft.VisualStudio.VCProjectEngine (Microsoft.VisualStudio.VCProjectEngine.dll 内)

構文

'宣言
ReadOnly Property Platforms As Object
    Get
Object Platforms { get; }
property Object^ Platforms {
    Object^ get ();
}
abstract Platforms : Object
function get Platforms () : Object

プロパティ値

型: System.Object
プロジェクト エンジンのプラットフォームのコレクション。

このサンプル コードをコンパイルして実行する方法については、「方法 : プロジェクト モデル機能拡張のプログラム例をコンパイルする」を参照してください。

現在のプロジェクト構成のプラットフォーム名を取得するサンプル コードを次に示します。

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs, plats As IVCCollection
        Dim cfg As VCConfiguration
        Dim ProjEng As VCProjectEngine
        Dim plat As VCPlatform
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        ProjEng = cfgs.VCProjectEngine
        plats = ProjEng.Platforms
        plat = plats.Item(1)
        MsgBox(plat.Name)
    End Sub
End Module

.NET Framework セキュリティ

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

参照

参照

VCProjectEngine インターフェイス

Microsoft.VisualStudio.VCProjectEngine 名前空間