dotnet / sdk-container-builds

Libraries and build tooling to create container images from .NET projects using MSBuild
https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container
MIT License
175 stars 30 forks source link

EnableSdkContainerDebugging causes build failure if ContainerImageTags is set #564

Open Cjewett opened 2 months ago

Cjewett commented 2 months ago

When setting EnableSdkContainerDebugging to true it breaks our compilation because we have ContainerImageTags set. The error is Both ContainerImageTag and ContainerImageTags were provided, but only one or the other is allowed. If I remove EnableSdkContainerDebugging the error goes away, but then the launchProfile for SdkContainer no longer works.

<PropertyGroup>
  <EnableSdkContainerSupport>true</EnableSdkContainerSupport>
  <EnableSdkContainerImage>true</EnableSdkContainerImage>
  <ContainerBaseImage>mcr.microsoft.com/dotnet/aspnet:8.0.0-jammy</ContainerBaseImage>
  <ContainerImageTags>latest;$(Version)</ContainerImageTags>
</PropertyGroup>

Using SDK 8.0.204