Condividi tramite


Proprietà ConfigurationManager.SupportedPlatforms

Ottiene un elenco di nomi di piattaforma che possono essere aggiunti al progetto e utilizzati per creare configurazioni della build.

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

Sintassi

'Dichiarazione
ReadOnly Property SupportedPlatforms As Object
Object SupportedPlatforms { get; }
property Object^ SupportedPlatforms {
    Object^ get ();
}
abstract SupportedPlatforms : Object with get
function get SupportedPlatforms () : Object

Valore proprietà

Tipo: Object
SafeArray di stringhe.

Esempi

public void CodeExample(DTE2 dte, AddIn addin)
{   // Make sure you have a solution loaded into Visual Studio
    // before running the following example.
    try
    {
        ConfigurationManager configmgr;
        Array arraySP;
        if (dte.Solution.Projects.Count > 0)
        {
            configmgr = dte.Solution.Projects.Item(1).ConfigurationManager;

            // Show all supported platforms.
            arraySP = (Array)configmgr.SupportedPlatforms;
            string sp = "Supported Platforms: \n";
            foreach (string s in arraySP)
                sp = sp + s + "\n";
            MessageBox.Show(sp);
        }
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

ConfigurationManager Interfaccia

Spazio dei nomi EnvDTE