IBuildEngine3.Yield Method

Informs the system that this task has a long-running out-of-process component and other work can be done in the build while that work completes.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:  Microsoft.Build.Framework
Assembly:  Microsoft.Build.Framework (in Microsoft.Build.Framework.dll)

Syntax

'Declaration
Sub Yield
void Yield()
void Yield()
abstract Yield : unit -> unit
function Yield()

Remarks

There is only one node (msbuild.exe process) per CPU. Only one project, target, and task can build at any time on a node. If a task is waiting, for example, for a spawned tool or some other event to complete, the task can call Yield, which returns immediately. This lets the node build a target in another project, if any are available. When the task is ready to continue, it should call Reacquire. As a rough rule, if a task expects that an operation will take more than 20 or 30 seconds, it can choose to call Yield before it starts the operation, and Reaquire when the operation is complete.

.NET Framework Security

See Also

Reference

IBuildEngine3 Interface

Microsoft.Build.Framework Namespace