Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Aspire.Hosting/Dcp/DcpExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,9 @@ async Task CreateResourceExecutablesAsyncCore(IResource resource, IEnumerable<Ap

private async Task CreateExecutableAsync(AppResource er, ILogger resourceLogger, CancellationToken cancellationToken)
{
// Force async execution
await Task.Yield();

if (er.DcpResource is not Executable exe)
{
throw new InvalidOperationException($"Expected an Executable resource, but got {er.DcpResource.Kind} instead");
Expand Down Expand Up @@ -1348,6 +1351,9 @@ async Task CreateContainerAsyncCore(AppResource cr, CancellationToken cancellati

private async Task CreateContainerAsync(AppResource cr, ILogger resourceLogger, CancellationToken cancellationToken)
{
// Force async execution
await Task.Yield();

await _executorEvents.PublishAsync(new OnResourceStartingContext(cancellationToken, KnownResourceTypes.Container, cr.ModelResource, cr.DcpResource.Metadata.Name)).ConfigureAwait(false);

var dcpContainerResource = (Container)cr.DcpResource;
Expand Down
Loading