Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)
This interface can be implemented by applications that host the BuildContent or BuildXact tasks, and passed in via the MSBuild HostObject property. The Content Pipeline build process checks whether the HostObject implements ICancelBuild, and if so, subscribes to the BuildCancelled event.
The cancellation status is checked whenever the build process outputs a log message. This check can sometimes result in a slight lag between the cancel event and when the build stops, but it ensures that the build is interrupted only at well known locations, which is much more robust than if you tried to forcibly interrupt it from inside unknown third-party code.