共用方式為


ConfigurationManager.SupportedPlatforms 屬性

取得可加入至此專案的平台名稱清單,而加入這些清單後便可以建立組建組態。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
ReadOnly Property SupportedPlatforms As Object
    Get
Object SupportedPlatforms { get; }
property Object^ SupportedPlatforms {
    Object^ get ();
}
abstract SupportedPlatforms : Object
function get SupportedPlatforms () : Object

屬性值

型別:System.Object
字串的 SafeArray

範例

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

.NET Framework 安全性

請參閱

參考

ConfigurationManager 介面

EnvDTE 命名空間