Configuration.IsRunable Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Gibt zurück, ob die Projekt-oder Projekt Element Konfiguration ausgeführt werden kann.
public:
property bool IsRunable { bool get(); };
public:
property bool IsRunable { bool get(); };
[System.Runtime.InteropServices.DispId(9)]
public bool IsRunable { [System.Runtime.InteropServices.DispId(9)] get; }
[<System.Runtime.InteropServices.DispId(9)>]
[<get: System.Runtime.InteropServices.DispId(9)>]
member this.IsRunable : bool
Public ReadOnly Property IsRunable As Boolean
Eigenschaftswert
Ein boolescher Wert, der angibt true , ob ein Projekt oder ein Projekt Element ausgeführt werden kann, false andernfalls.
- Attribute
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 run.
MessageBox.Show(config.IsRunable.ToString());
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Hinweise
Wenn Sie ausgeführt werden kann, können Sie Sie in der-Eigenschaft des-Objekts angeben, SolutionBuild StartupProjects Wenn es sich um ein-Projekt handelt.