SolutionConfigurations.Add Method

Creates a new solution configuration based on an existing one.

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

Syntax

'Declaration
Function Add ( _
    NewName As String, _
    ExistingName As String, _
    Propagate As Boolean _
) As SolutionConfiguration
SolutionConfiguration Add(
    string NewName,
    string ExistingName,
    bool Propagate
)
SolutionConfiguration^ Add(
    [InAttribute] String^ NewName, 
    [InAttribute] String^ ExistingName, 
    [InAttribute] bool Propagate
)
abstract Add : 
        NewName:string * 
        ExistingName:string * 
        Propagate:bool -> SolutionConfiguration
function Add(
    NewName : String, 
    ExistingName : String, 
    Propagate : boolean
) : SolutionConfiguration

Parameters

  • NewName
    Type: System.String

    Required. The name of the new solution configuration.

  • Propagate
    Type: System.Boolean

    Required. True if the new solution configuration should be propagated, False if not. If Propagate is set to True, then the newly added solution configuration will be automatically added to all of the projects under that solution, as well as to the solution itself.

Return Value

Type: EnvDTE.SolutionConfiguration
A SolutionConfiguration object.

Remarks

Add creates a new solution configuration based on the one named in ExistingName. The new solution configuration uses the same project configurations for the configuration and platform contexts. If ExistingName is empty, then Add creates a new solution configuration based on default values.

The default solution configuration contains all projects and marks all projects to be built. In addition, it chooses the project configurations that are active when the solution configuration is activated, subject to the following guidelines:

  • Any project configuration names that completely match the new solution configuration's name, including case-insensitivity, are chosen.

  • Failing any such matches, any project configuration name that contains the project configuration's name is chosen.

  • Failing that, any project configuration listed first for a project by the project is chosen. The convention is to list the Debug project configuration first if you support one with that name.

.NET Framework Security

See Also

Reference

SolutionConfigurations Interface

EnvDTE Namespace