SolutionBuild2.SolutionConfigurations Property


Gets a collection of SolutionConfiguration objects.

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

SolutionConfigurations SolutionConfigurations { get; }

Property Value

Type: EnvDTE.SolutionConfigurations

A SolutionConfigurations collection.

This example sets the first solution configurations item to "release" and then builds the solution. Open a project in the Visual Studio integrated development environment (IDE) before running this example.

using EnvDTE;
using EnvDTE80;
using System.Windows.Forms;
public void SolutionConfigurationsExample(DTE2 dte)
        Solution2 soln = (Solution2)_applicationObject.Solution;
        SolutionBuild2 sb;
    BuildDependencies bld;
        // Open a solution in Visual Studio before 
        // running this example.
        sb = (SolutionBuild2)soln.SolutionBuild;
        bld = sb.BuildDependencies;
        MessageBox.Show("The project " + bld.Item(1).Project.Name 
+ " has " + bld.Count.ToString() + " build dependencies.");
        MessageBox.Show("Set the configuration to release 
and build...");
    catch (Exception ex)
Return to top