# DotnetProgramBuildCompletionAnnotation Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [DotnetProgramBuildCompletionAnnotation](/reference/api/csharp/aspire.hosting/dotnetprogrambuildcompletionannotation.md)
- Kind: `Properties`
- Members: `1`

Provides an optional successful-build barrier for consumers of a .NET program's build output.

<a id="callback"></a>

## Callback

- Name: `Callback`
- Modifiers: `get`
- Returns: `Func<IServiceProvider, CancellationToken, Task>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting/ApplicationModel/DotnetProgramBuildCompletionAnnotation.cs#L38)

Gets the callback that waits for the current build to complete successfully.

```csharp
public Func<IServiceProvider, CancellationToken, Task> Callback { get; }
```

## Remarks

Invoke this callback for each operation; do not cache its returned task across retries or rebuilds. Cancellation of a consumer must not cancel the build or other consumers.
