SolutionContext.PlatformName プロパティ

更新 : 2007 年 11 月

この割り当てによってサポートされるプラットフォームの名前を取得します。

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

構文

'宣言
ReadOnly Property PlatformName As String
'使用
Dim instance As SolutionContext
Dim value As String

value = instance.PlatformName
string PlatformName { get; }
property String^ PlatformName {
    String^ get ();
}
function get PlatformName () : String

プロパティ値

型 : System.String

この割り当てによってサポートされるプラットフォーム名を表す文字列。

解説

プロジェクトでサポートするプラットフォームがない場合、PlatformName は空の文字列を返します。

Sub PlatformNameExample(ByVal dte As DTE2)

    ' Before running this example, open a project.

    ' Display the solution contexts of the Debug configuration.
    Dim config As SolutionConfiguration = _
        dte.Solution.SolutionBuild.SolutionConfigurations.Item("Debug")
    Dim context As SolutionContext
    Dim msg As String

    msg &= config.Name & " Configuration Project Platforms:" & _
        vbCrLf & vbCrLf

    For Each context In config.SolutionContexts
        msg &= "    " & context.ProjectName & " = " & _
            context.PlatformName & vbCrLf
    Next

    MsgBox(msg)

End Sub
public void PlatformNameExample(DTE2 dte)
{
    // Before running this example, open a project.

    // Display the solution contexts of the Debug configuration.
    SolutionConfiguration config = 
        dte.Solution.SolutionBuild.SolutionConfigurations.Item(
        "Debug");
    string msg = "";

    msg += config.Name + " Configuration Project Platforms:\n\n";

    foreach (SolutionContext context in config.SolutionContexts)
        msg += "    " + context.ProjectName + " = " + 
            context.PlatformName + "\n";

    MessageBox.Show(msg);
}

アクセス許可

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

参照

参照

SolutionContext インターフェイス

SolutionContext メンバ

EnvDTE 名前空間

その他の技術情報

方法 : オートメーション オブジェクト モデルのコード例をコンパイルおよび実行する