Configuration.OutputGroups 属性

获取 OutputGroup 对象的集合,该集合包含作为项目输出的文件的名称。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
ReadOnly Property OutputGroups As OutputGroups
OutputGroups OutputGroups { get; }
property OutputGroups^ OutputGroups {
    OutputGroups^ get ();
}
abstract OutputGroups : OutputGroups
function get OutputGroups () : OutputGroups

属性值

类型:EnvDTE.OutputGroups
一个 OutputGroups 集合。

示例

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

.NET Framework 安全性

请参见

参考

Configuration 接口

EnvDTE 命名空间