Microsoft.Build.Framework Namespace

The Microsoft.Build.Framework namespace contains the types that define how tasks and loggers interact with the MSBuild engine. For information, see MSBuild.

Classes

BuildErrorEventArgs

Arguments for error events

BuildEventArgs

This class encapsulates the default data associated with build events. It is intended to be extended/sub-classed.

BuildEventContext

Will provide location information for an event, this is especially needed in a multi processor environment

BuildFinishedEventArgs

This class represents the event arguments for build finished events.

BuildMessageEventArgs

Arguments for message events

BuildStartedEventArgs

Arguments for build started events.

BuildStatusEventArgs

Base class for build status events. This class is meant to be extended.

BuildWarningEventArgs

Arguments for warning events

CriticalBuildMessageEventArgs

Arguments for critical message events. These always have High importance.

CustomBuildEventArgs

Arguments for custom build events.

EnvironmentVariableReadEventArgs

Arguments for the environment variable read event.

ExternalProjectFinishedEventArgs

Arguments for external project finished events

ExternalProjectStartedEventArgs

Arguments for external project started events

LazyFormattedBuildEventArgs

Stores strings for parts of a message delaying the formatting until it needs to be shown

LoadInSeparateAppDomainAttribute

This attribute is used to mark tasks that need to be run in their own app domains. The build engine will create a new app domain each time it needs to run such a task, and immediately unload it when the task is finished.

LoggerException

Exception that should be thrown by a logger when it cannot continue. Allows a logger to force the build to stop in an explicit way, when, for example, it receives invalid parameters, or cannot write to disk.

MetaprojectGeneratedEventArgs

Arguments for the metaproject generated event.

OutputAttribute

This attribute is used by task writers to designate certain task parameters as "outputs". The build engine will only allow task parameters (i.e. the task class' .NET properties) that are marked with this attribute to output data from a task. Project authors can only use parameters marked with this attribute in a task's <Output> tag. All task parameters, including those marked with this attribute, may be treated as inputs to a task by the build engine.

ProjectEvaluationFinishedEventArgs

Arguments for the project evaluation finished event.

ProjectEvaluationStartedEventArgs

Arguments for the project evaluation started event.

ProjectFinishedEventArgs

Arguments for project finished events

ProjectImportedEventArgs

Arguments for the project imported event.

ProjectStartedEventArgs

Arguments for project started events

PropertyInitialValueSetEventArgs

The argument for a property initial value set event.

PropertyReassignmentEventArgs

The argument for a property reassignment event.

RequiredAttribute

This class defines the attribute that a task writer can apply to a task's property to declare the property to be a required property.

RequiredRuntimeAttribute

When marked with the RequiredRuntimeAttribute, a task indicates that it has stricter runtime requirements than a regular task - this tells MSBuild that it will need to potentially launch a separate process for that task if the current runtime does not match the version requirement. This attribute is currently non-functional since there is only one version of the CLR that is capable of running MSBuild v2.0 or v3.5 - the runtime v2.0

RunInMTAAttribute

This attribute is used to mark a task class as explicitly not being required to run in the STA for COM.

RunInSTAAttribute

This attribute is used to mark a task class as being required to run in a Single Threaded Apartment for COM.

SdkLogger

An abstract interface class to providing real-time logging and status while resolving an SDK.

SdkReference

Represents a software development kit (SDK) that is referenced in a <Project /> or <Import /> element.

SdkResolver

An abstract interface for classes that can resolve a Software Development Kit (SDK).

SdkResolverContext

Context used by an SdkResolver to resolve an SDK.

SdkResult

An abstract interface class to indicate SDK resolver success or failure. Note: Use SdkResultFactory to create instances of this class. Do not inherit from this class.

SdkResultFactory

An abstract interface class provided to SdkResolver to create an SdkResult object indicating success / failure.

TargetFinishedEventArgs

Arguments for target finished events

TargetSkippedEventArgs

Arguments for the target skipped event.

TargetStartedEventArgs

Arguments for target started events

TaskCommandLineEventArgs

This class is used by tasks to log their command lines. This class extends BuildMessageEventArgs so that command lines can be logged as messages. Logging a command line is only relevant for tasks that wrap an underlying executable/tool, or emulate a shell command. Tasks that have no command line equivalent should not raise this extended message event.

TaskFinishedEventArgs

Arguments for task finished events

TaskPropertyInfo

Class which represents the parameter information from the using task as a strongly typed class.

TaskStartedEventArgs

Arguments for task started events

TelemetryEventArgs

Arguments for telemetry events.

UninitializedPropertyReadEventArgs

The arguments for an uninitialized property read event.

Structs

BuildEngineResult

This structure is used to return the result of the build and the target outputs.

Interfaces

IBuildEngine

This interface exposes functionality on the build engine that is required for task authoring.

IBuildEngine2

This interface extends IBuildEngine to provide a method allowing building project files in parallel.

IBuildEngine3

This interface extends IBuildEngine to provide a method allowing building project files in parallel.

IBuildEngine4

This interface extends IBuildEngine to provide a mechanism allowing tasks to share data between task invocations.

IBuildEngine5

This interface extends IBuildEngine to log telemetry.

IBuildEngine6

This interface extends IBuildEngine5 to allow tasks to get the current project's global properties.

ICancelableTask

Interface for tasks which can be cancelled.

IEventRedirector

This interface is used to forward events to another loggers

IEventSource

This interface defines the events raised by the build engine. Loggers use this interface to subscribe to the events they are interested in receiving.

IEventSource2

This interface defines the events raised by the build engine. Loggers use this interface to subscribe to the events they are interested in receiving.

IEventSource3

This interface defines the events raised by the build engine. Loggers use this interface to subscribe to the events they are interested in receiving.

IForwardingLogger

This interface extends the ILogger interface to provide a property which can be used to forward events to a logger running in a different process. It can also be used create filtering loggers.

IGeneratedTask

An interface implemented by tasks that are generated by ITaskFactory instances.

ILogger

This interface defines a "logger" in the build system. A logger subscribes to build system events. All logger classes must implement this interface to be recognized by the build engine.

INodeLogger

This interface defines a "parallel aware logger" in the build system. A parallel aware logger will accept a cpu count and be aware that any cpu count greater than 1 means the events will be received from the logger from each cpu as the events are logged.

IProjectElement

Interface for exposing a ProjectElement to the appropriate loggers

ITask

This interface defines a "task" in the build system. A task is an atomic unit of build operation. All task classes must implement this interface to be recognized by the build engine.

ITaskFactory

Interface that a task factory Instance should implement

ITaskFactory2

Interface that a task factory Instance should implement if it wants to be able to use new UsingTask parameters such as Runtime and Architecture.

ITaskHost

This empty interface is used to pass host objects from an IDE to individual tasks. Depending on the task itself and what kinds parameters and functionality it exposes, the task should define its own interface that inherits from this one, and then use that interface to communicate with the host.

ITaskItem

This interface defines a project item that can be consumed and emitted by tasks.

ITaskItem2

This interface adds escaping support to the ITaskItem interface.

Enums

LoggerVerbosity

Enumeration of the levels of detail of an event log.

MessageImportance

This enumeration provides three levels of importance for messages.

RegisteredTaskObjectLifetime

Defines the lifetime of a registered task object.

TargetBuiltReason

The reason that a target was built by its parent target.

Delegates

AnyEventHandler

Type of handler for AnyEventRaised events

BuildErrorEventHandler

Type of handler for ErrorRaised events

BuildFinishedEventHandler

Type of handler for BuildFinishedEvent events

BuildMessageEventHandler

Type of handler for MessageRaised events

BuildStartedEventHandler

Type of handler for BuildStartedEvent events

BuildStatusEventHandler

Type of handler for BuildStatus events

BuildWarningEventHandler

Type of handler for WarningRaised events

CustomBuildEventHandler

Type of handler for CustomEventRaised events

ProjectFinishedEventHandler

Type of handler for ProjectFinished events

ProjectStartedEventHandler

Type of handler for ProjectStarted events

TargetFinishedEventHandler

Type of handler for TargetFinished events

TargetStartedEventHandler

Type of handler for TargetStarted events

TaskFinishedEventHandler

Type of handler for TaskFinished events

TaskStartedEventHandler

Type of handler for TaskStarted events

TelemetryEventHandler

Type of handler for TelemetryLogged events