Compartir a través de


Configuration.PlatformName (Propiedad)

Obtiene el nombre de la plataforma compatible con esta asignación.

Espacio de nombres:  EnvDTE
Ensamblado:  EnvDTE (en EnvDTE.dll)

Sintaxis

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

Valor de propiedad

Tipo: System.String
Una cadena que representa el nombre de la plataforma compatible con esta asignación.

Comentarios

Si el proyecto no admite ninguna plataforma, PlatformName devuelve una cadena vacía.

Ejemplos

public void CodeExample(DTE2 dte, AddIn addin)
{   // Make sure you have a solution loaded into Visual Studio
    // before running the following example.
    try
    {
        Project prj;
        Configuration config; 
        OutputGroups outPGs;
        Properties props;
        if (dte.Solution.Projects.Count > 0)
        {
            prj = dte.Solution.Projects.Item(1);
            config = prj.ConfigurationManager.ActiveConfiguration;
            // Return a collection of OutputGroup objects that contain
            // the names of files that are outputs for the project.
            outPGs = config.OutputGroups;
            MessageBox.Show(outPGs.Count.ToString());
            // Returns the project for the config.
            MessageBox.Show(((Project)config.Owner).Name);
            // Returning the platform name for the Configuration.
            MessageBox.Show(config.PlatformName);
            // Returning all properties for Configuration object.
            props = config.Properties;
            string p = "";
            foreach (Property prop in props)
            {
                p = p + prop.Name + "\n";
            }
            MessageBox.Show(p);
        }
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

Seguridad de .NET Framework

Vea también

Referencia

Configuration Interfaz

EnvDTE (Espacio de nombres)

Otros recursos

Cómo: Compilar y ejecutar los ejemplos de código del modelo de objetos de automatización