Compartilhar via


BuildManager Interface

Definition

Used by third-party developers to manage the portable executable (PE) files produced by running custom tools.

public interface class BuildManager
public interface class BuildManager
__interface BuildManager
[System.Runtime.InteropServices.Guid("C711E2B7-3C58-4C37-9359-705208A890AE")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface BuildManager
[System.Runtime.InteropServices.Guid("C711E2B7-3C58-4C37-9359-705208A890AE")]
public interface BuildManager
[<System.Runtime.InteropServices.Guid("C711E2B7-3C58-4C37-9359-705208A890AE")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type BuildManager = interface
[<System.Runtime.InteropServices.Guid("C711E2B7-3C58-4C37-9359-705208A890AE")>]
type BuildManager = interface
Public Interface BuildManager
Attributes

Examples

This example lists all the monikers for temporary PEs in a project. Only project items that have their CustomTool property set to a custom tool that generates design-time output have monikers associated with them. One easy way to see a moniker is to create a Windows Application project and add an XML Schema project item. The XML Schema project item has the CustomTool property set to MSDataSetGenerator.

' Macro editor  
Sub BuildManagerExample()  
   Try  
      Dim proj As VSLangProj.VSProject = _  
         CType(DTE.Solution.Projects.Item(1).Object, VSLangProj.VSProject)  
      Dim build As BuildManager = proj.BuildManager  
      Dim monikers As String() = _  
         CType(build.DesignTimeOutputMonikers, String())  
      Dim moniker As String  
      ' List the monikers.  
      For Each moniker In monikers  
         MsgBox(moniker & ControlChars.CrLf & _  
            build.BuildDesignTimeOutput(moniker))  
      Next  
      ' Hook up some events.  
      Dim buildEvents As BuildManagerEvents = _  
         proj.Events.BuildManagerEvents  
      AddHandler buildEvents.DesignTimeOutputDeleted, _  
         AddressOf OutputDeleted  
      AddHandler buildEvents.DesignTimeOutputDirty, _  
         AddressOf OutputDirty  
   Catch ex As System.Exception  
      MsgBox("Cannot list monikers and hook up events.")  
   End Try  
End Sub  

Sub OutputDeleted(ByVal deletedMoniker As String)  
   MsgBox(deletedMoniker & " was deleted.")  
End Sub  

Sub OutputDirty(ByVal dirtyMoniker As String)  
   MsgBox(dirtyMoniker & " is dirty.")  
End Sub  

Remarks

The BuildManager provides access to the project's temporary PEs, which are created from custom tool output. For more information, see Introduction to the BuildManager Object and RunCustomTool method.

Properties

ContainingProject

Gets the project of which the selected item is a part. Read-only.

DesignTimeOutputMonikers

Gets the temporary portable executable (PE) monikers for a project.

DTE

Gets the top-level extensibility object.

Parent

Gets the immediate parent object of a given object.

Methods

BuildDesignTimeOutput(String)

Builds a temporary portable executable (PE) and returns its description in an XML string.

Applies to