Compartir a través de


ConfigurationManager.SupportedPlatforms Property

Definition

Gets a list of platform names that can be added to this project and which may be added to create build configurations.

public:
 property System::Object ^ SupportedPlatforms { System::Object ^ get(); };
public:
 property Platform::Object ^ SupportedPlatforms { Platform::Object ^ get(); };
[System.Runtime.InteropServices.DispId(12)]
public object SupportedPlatforms { [System.Runtime.InteropServices.DispId(12)] get; }
[<System.Runtime.InteropServices.DispId(12)>]
[<get: System.Runtime.InteropServices.DispId(12)>]
member this.SupportedPlatforms : obj
Public ReadOnly Property SupportedPlatforms As Object

Property Value

A SafeArray of strings.

Attributes

Examples

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

Applies to