Skip to content

[Bug] "empty dotnet configuration output" error when publishing Aspire empty project with Kafka packages #8525

@vhvb1989

Description

@vhvb1989

Linked Issue

Upstream: microsoft/aspire#17593

Description

When using azd up to publish an Aspire empty project that has added Kafka packages (Aspire.Confluent.Kafka and Aspire.Hosting.Kafka), the deployment fails with:

ERROR: empty dotnet configuration output

The error originates from cli/azd/pkg/tools/dotnet/dotnet.go in the getTargetPort() function, which parses the output of dotnet publish with /t:PublishContainer. When the dotnet publish output is empty or missing the config JSON property, azd returns this error with a suggestion to enable EnableSdkContainerSupport. However, the reporter confirms that adding <EnableSdkContainerSupport>true</EnableSdkContainerSupport> to the project file did not resolve the issue.

Repro Steps

  1. Create an Aspire Empty App
  2. Add an ASP.NET Core Web App project and reference it from AppHost
  3. Add Kafka packages (Aspire.Confluent.Kafka, Aspire.Hosting.Kafka)
  4. Configure Kafka connection in AppHost and Web project
  5. Run azd init and azd up

Expected

Project publishes successfully.

Actual

azd up fails with ERROR: empty dotnet configuration output.

Environment

  • azd version: 1.26.0-beta.1-daily.6353010
  • Aspire: 13.4.0 (also repros on 13.3.5)
  • OS: Windows 11 25H2 x64
  • Container runtime: Podman 5.8.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions