Project.ConfigurationManager Property

Gets the ConfigurationManager object for this Project .

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

ConfigurationManager ConfigurationManager { get; }

The ConfigurationManager object represents the project configurations for a project or project item. A project configuration name and platform name uniquely identify each project configuration.

public void ConfigurationManagerExample(DTE2 dte)
{
    // Before running this sample, open a project.

    Project proj = dte.Solution.Item(1);
    ConfigurationManager manager = proj.ConfigurationManager;

    // Define a new Debug-based configuration for the project.
    Configurations configs = 
        manager.AddConfigurationRow("MyDebug", "Debug", false);
    string msg = "";

    // List all build configurations for the project.
    foreach (EnvDTE.Configuration config in configs)
        msg += config.ConfigurationName;

    MessageBox.Show(proj.Name + 
        " defines the following build configurations:\n\n" + msg);
}

Community Additions

ADD
Show: