Freigeben über


ConfigurationManager.AddConfigurationRow-Methode

Erstellt eine neue Konfigurationszeile für ein Projekt bzw. Projektelement auf der Grundlage des Configuration-Objekts einer vorhandenen Konfigurationszeile für ein Projekt bzw. Projektelement.

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

Syntax

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

Parameter

  • NewName
    Typ: String

    Erforderlich. Ein eindeutiger Name der neuen Konfigurationszeile für ein Projekt bzw. Projektelement.

  • ExistingName
    Typ: String

    Erforderlich. Der Name der Konfigurationszeile für ein Projekt bzw. Projektelement, die kopiert werden soll, um die neue Konfigurationszeile zu erstellen.

  • Propagate
    Typ: Boolean

    Erforderlich. true, wenn die Konfigurationszeile für ein Projekt bzw. Projektelement übertragen werden soll, andernfalls false.

Rückgabewert

Typ: EnvDTE.Configurations
Eine Configurations-Auflistung.

Hinweise

AddConfigurationRow gibt die Auflistung neuer Configuration-Objekte zurück. Wenn NewName für dieses Projekt bereits vorhanden ist, dann schlägt diese Methode fehl. So erkennen Sie, dass die ExistingName-Einstellungen nicht kopiert wurden.

Beispiele

Sub AddConfigurationRowExample()
    ' Make a copy of the "Debug" configurations to temporarily change 
    ' them without affecting the original "Debug" configurations.
    Dim cfgmgr As ConfigurationManager = _
        DTE.ActiveSolutionProject.ConfigurationManager
    Dim cfgs = Cfgmgr.AddConfigurationRow("MyDebug", "Debug")
    For Each (cfg in cfgs)
        Cfg.Properties.Item("SomeProperty") = True
    Next
End Sub

.NET Framework-Sicherheit

Siehe auch

Referenz

ConfigurationManager Schnittstelle

EnvDTE-Namespace