MSBuildMultiThreadableTaskAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attribute that marks a task class as thread-safe for multithreaded execution.
public ref class MSBuildMultiThreadableTaskAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
public class MSBuildMultiThreadableTaskAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)>]
type MSBuildMultiThreadableTaskAttribute = class
inherit Attribute
Public Class MSBuildMultiThreadableTaskAttribute
Inherits Attribute
- Inheritance
-
MSBuildMultiThreadableTaskAttribute
- Attributes
Remarks
Task classes marked with this attribute indicate they can be safely executed in parallel in the same process with other tasks.
Tasks using this attribute must satisfy strict requirements: - Must not modify global process state (environment variables, working directory, etc.) - Must not depend on global process state, including relative path resolution
MSBuild detects this attribute by its namespace and name only, ignoring the defining assembly. This allows customers to define the attribute in their own assemblies alongside their tasks.
When defining polyfilled versions of this attribute in customer assemblies, they must also specify Inherited = false to ensure proper non-inheritable semantics.
Constructors
| Name | Description |
|---|---|
| MSBuildMultiThreadableTaskAttribute() |
Initializes a new instance of the MSBuildMultiThreadableTaskAttribute class. |