Propriedade SolutionContext.PlatformName

Obtém o nome da plataforma suportada por esta atribuição.

Namespace:  EnvDTE
Assembly:  EnvDTE (em EnvDTE.dll)

Sintaxe

'Declaração
ReadOnly Property PlatformName As String
    Get
string PlatformName { get; }
property String^ PlatformName {
    String^ get ();
}
abstract PlatformName : string
function get PlatformName () : String

Valor de propriedade

Tipo: System.String
Uma seqüência de caracteres que representa o nome da plataforma suportado por esta atribuição.

Comentários

Se o projeto oferece suporte a nenhuma plataforma, em seguida, PlatformName retorna uma seqüência de caracteres vazia.

Exemplos

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);
}

Segurança do .NET Framework

Consulte também

Referência

SolutionContext Interface

Namespace EnvDTE

Outros recursos

Como: compilar e Executar a automação de exemplos de Código do modelo de objeto