Condividi tramite


Proprietà SolutionContext.PlatformName

Ottiene il nome della piattaforma supportata da questa assegnazione.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

'Dichiarazione
ReadOnly Property PlatformName As String
    Get
string PlatformName { get; }
property String^ PlatformName {
    String^ get ();
}
abstract PlatformName : string
function get PlatformName () : String

Valore proprietà

Tipo: System.String
Stringa che rappresenta la piattaforma supportata da questa assegnazione.

Note

Se il progetto non supporta piattaforme, la proprietà PlatformName restituisce una stringa vuota.

Esempi

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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

SolutionContext Interfaccia

Spazio dei nomi EnvDTE

Altre risorse

Procedura: compilare ed eseguire gli esempi di codice del modello a oggetti di automazione