VSProject2.BuildManager Property


Gets the BuildManager object of the VSProject.

 property VSLangProj::BuildManager ^ BuildManager { VSLangProj::BuildManager ^ get(); };
 property VSLangProj::BuildManager ^ BuildManager { VSLangProj::BuildManager ^ get(); };
[get: System.Runtime.InteropServices.DispId(2)]
public VSLangProj.BuildManager BuildManager { get; }
member this.BuildManager : VSLangProj.BuildManager
Public ReadOnly Property BuildManager As BuildManager

Property Value




To run this example as an add-in, see How to: Compile and Run the Automation Object Model Code Examples. Open a Visual Basic or Visual C# project before running this add-in.

[Visual Basic]

Imports VSLangProj  
Imports VSLangProj2  
Imports VSLangProj80  
Public Sub OnConnection(ByVal application As Object, _  
 ByVal connectMode As ext_ConnectMode, ByVal addInInst As Object, _  
 ByRef custom As Array) Implements IDTExtensibility2.OnConnection  
    applicationObject = CType(application, DTE2)  
    addInInstance = CType(addInInst, AddIn)  
End Sub  
Sub BuildManagerTest(ByVal dte As DTE2)  
    Dim aProject As Project  
    Dim aVSProject As VSProject2  
    aProject = applicationObject.Solution.Projects.Item(1)  
    MsgBox("Project kind is: " & aProject.Kind & vbCr _  
    & "Project name is: " & aProject.Name)  
    aVSProject = CType(applicationObject.Solution.Projects.Item(1) _  
    .Object, VSProject2)  
    MsgBox("The full name of the project is:" & vbCr _  
    & aVSProject.Project.FullName)  
    MsgBox("The BuildManager's containing project is: "_  
    & aVSProject.BuildManager.ContainingProject.Name)  
    MsgBox("The Buildmanager's design time output monikers type is:" _  
    & vbCr &_  
End Sub  


using System.Windows.Forms;  
using VSLangProj;  
using VSLangProj2;  
using VSLangProj80;  
public void OnConnection(object application,  
 ext_ConnectMode connectMode, object addInInst, ref Array custom)  
    applicationObject = (DTE2)application;  
    addInInstance = (AddIn)addInInst;  
public void BuildManagerTest(DTE2 dte)  
    Project aProject = null;  
    VSProject2 aVSProject = null;  
    aProject = applicationObject.Solution.Projects.Item(1);  
    MessageBox.Show("Project kind is: " + aProject.Kind + "\n"  
 + "Project name is: " + aProject.Name);  
    aVSProject = ((VSProject2)( applicationObject.Solution.Projects.Item(1).Object));  
    MessageBox.Show("The full name of the project is:" + "\n"   
+ aVSProject.Project.FullName);  
    MessageBox.Show("The BuildManager's containing project is: "  
 + aVSProject.BuildManager.ContainingProject.Name);  
    MessageBox.Show("The Buildmanager's design time output monikers  
 type is:" + "\n" +   


The BuildManager property is used by third-party developers to manage the portable executables produced by running custom tools. For more information, see BuildManagerEvents.

Applies to