Share via


ConfigurationManager.SupportedPlatforms, propriété

Obtient une liste des noms de plateformes pouvant être ajoutés à ce projet et pouvant servir à la création de configurations de build.

Espace de noms :  EnvDTE
Assembly :  EnvDTE (dans EnvDTE.dll)

Syntaxe

'Déclaration
ReadOnly Property SupportedPlatforms As Object
    Get
Object SupportedPlatforms { get; }
property Object^ SupportedPlatforms {
    Object^ get ();
}
abstract SupportedPlatforms : Object
function get SupportedPlatforms () : Object

Valeur de propriété

Type : System.Object
SafeArray de chaînes.

Exemples

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

Sécurité .NET Framework

Voir aussi

Référence

ConfigurationManager Interface

EnvDTE, espace de noms