Configuration.IsRunable Propriedade

Definição

Retorna se a configuração do projeto ou do item do projeto pode ser executada.

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

Valor da propriedade

Boolean

Um valor booliano que indica true se um projeto ou item de projeto pode ser executado, false caso contrário.

Atributos

Exemplos

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);  
    }  
}  

Comentários

Se ele puder ser executado, você poderá especificá-lo na SolutionBuild Propriedade do objeto StartupProjects se ele for um projeto.

Aplica-se a