Configuration.IsDeployable-Eigenschaft

Ruft ab, ob die Konfiguration für das Projekt bzw. das Projektelement bereitgestellt werden kann.

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

Syntax

'Declaration
ReadOnly Property IsDeployable As Boolean
bool IsDeployable { get; }
property bool IsDeployable {
    bool get ();
}
abstract IsDeployable : bool
function get IsDeployable () : boolean

Eigenschaftswert

Typ: System.Boolean
Ein boolescher Wert, der true lautet, wenn ein Projekt oder Projektelement bereitgestellt werden kann, und andernfalls false.

Hinweise

Wenn Sie angeben möchten, dass ein Projekt oder Element bereitgestellt werden soll, geben Sie es in SolutionContext als die Konfiguration an, die Kontext enthält und zum Bereitstellen für eine bestimmte Projektmappenkonfiguration verwendet werden soll.

Beispiele

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;
        if (dte.Solution.Projects.Count > 0)
        {
            prj = dte.Solution.Projects.Item(1);
            config = prj.ConfigurationManager.ActiveConfiguration;
            // Determine and show whether the active configuration can be deployed.
            MessageBox.Show(config.IsDeployable.ToString());
        }
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

.NET Framework-Sicherheit

Siehe auch

Referenz

Configuration Schnittstelle

EnvDTE-Namespace

Weitere Ressourcen

Gewusst wie: Kompilieren und Ausführen der Codebeispiele für das Automatisierungsobjektmodell