This documentation is archived and is not being maintained.
Engine Class
Visual Studio 2010
Note: This API is now obsolete.
Represents the MSBuild engine.
Assembly: Microsoft.Build.Engine (in Microsoft.Build.Engine.dll)
The Engine type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Engine() | Initializes a new instance of the Engine class. |
![]() | Engine(BuildPropertyGroup) | Initializes a new instance of the Engine class. |
![]() | Engine(String) | Obsolete. Initializes a new instance of the Engine class that has the specified BinPath. |
![]() | Engine(ToolsetDefinitionLocations) | Initializes a new instance of the Engine class. |
![]() | Engine(BuildPropertyGroup, ToolsetDefinitionLocations) | Initializes a new instance of the Engine class. |
![]() | Engine(BuildPropertyGroup, ToolsetDefinitionLocations, Int32, String) | Initializes a new instance of the Engine class. |
| Name | Description | |
|---|---|---|
![]() | BinPath | Obsolete. Gets or sets the path to MSBuild.exe. |
![]() | BuildEnabled | Gets or sets a value that indicates whether the building of targets in the project is enabled. |
![]() | DefaultToolsVersion | The default ToolsVersion of this build engine. |
![]() ![]() | GlobalEngine | Gets the Engine that is global (shared) for this AppDomain. |
![]() | GlobalProperties | Gets or sets a collection of the global properties for the project. |
![]() | IsBuilding | Gets whether a project is currently being built. |
![]() | OnlyLogCriticalEvents | Gets or sets a value that indicates whether to only log critical events, such as warnings and errors, during the build. |
![]() | Toolsets | Returns the collection of Toolsets that are recognized by this build engine instance. |
![]() ![]() | Version | Gets the version of the Engine. |
| Name | Description | |
|---|---|---|
![]() | BuildProject(Project) | Builds the specified Project. |
![]() | BuildProject(Project, String) | Builds the specified target of the specified Project. |
![]() | BuildProject(Project, array<String>) | Builds the specified targets of the specified Project. |
![]() | BuildProject(Project, array<String>, IDictionary) | Builds the specified targets of the specified Project, and returns the outputs of the targets. |
![]() | BuildProject(Project, array<String>, IDictionary, BuildSettings) | Builds the specified targets of the specified Project with the specified BuildSettings, and returns the outputs of the targets. |
![]() | BuildProjectFile(String) | Loads the specified project file and builds the project. |
![]() | BuildProjectFile(String, String) | Loads the specified project file and builds the specified target of the project. |
![]() | BuildProjectFile(String, array<String>) | Loads the specified project file and builds the specified targets of the project. |
![]() | BuildProjectFile(String, array<String>, BuildPropertyGroup) | Loads the specified project file and builds the specified targets of the project with the specified GlobalProperties, and returns the outputs of the targets. |
![]() | BuildProjectFile(String, array<String>, BuildPropertyGroup, IDictionary) | Loads the specified project file and builds the specified targets of the project with the specified GlobalProperties, and returns the outputs of the targets. |
![]() | BuildProjectFile(String, array<String>, BuildPropertyGroup, IDictionary, BuildSettings) | Loads the specified project file and builds the specified targets of the project with the specified BuildSettings and GlobalProperties, and returns the outputs of the targets. |
![]() | BuildProjectFile(String, array<String>, BuildPropertyGroup, IDictionary, BuildSettings, String) | Loads a project file from disk and builds the given targets. |
![]() | BuildProjectFiles | Loads a set of project files from disk and then builds the given list of targets for each project. |
![]() | CreateNewProject | Creates an empty Project object that is associated with this Engine. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLoadedProject | Returns the Project object that is associated with the specified project file. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | RegisterDistributedLogger | Registers distributed loggers with the build engine. |
![]() | RegisterLogger | Registers the specified logger with the Engine. |
![]() | Shutdown | Called when the host is finished with this build engine. It unregisters loggers and shuts down nodes. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | UnloadAllProjects | Removes all references to Project objects from the Engine. |
![]() | UnloadProject | Removes the reference to the specified Project from the Engine. |
![]() | UnregisterAllLoggers | Unregisters all loggers from the Engine. |
The following example creates an Engine object and uses the BuildProjectFile method to build a project file. The FileLogger class is used to log information to a file.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
