You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multi-arch container publishing doesn't work when certain RID-forcing publish properties are set #49972
Area-ContainersRelated to dotnet SDK containers functionalitymulti-RID-publishingIssues related to the lack of multi-RID publishing semantics in the SDKuntriagedRequest triage from a team member
With multi-arch container publish being a thing, some users are using it with publish configurations that conflict with historical decisions that the .NET SDK has had. Specifically, while we would like the container publish for multi arch to logically look like
outer build does zero work
triggers N inner RID-specific build
outer build uses results of inner build to make image manifest
The decision to make the PublishContainer target implicitly rely on the Publish target (via the documented command dotnet publish -t:PublishContainer) means that the outer project (with no RID set) is also asked to publish - and as a result if the outer project has properties like PublishReadyToRun, PublishAot, etc set then the RuntimeIdentifierInference targets force it to get a RID, which then short-circuits the decision-making of the PublishContainer target on if it is doing multi-arch publish.
One workaround is to disable UseCurrentRuntimeIdentifier, but the CLi today seems to not allow passing false for this option.
changed the title [-]Multi-arch container publishing doesn't work when certian RID-forcing publish properties are set[/-][+]Multi-arch container publishing doesn't work when certain RID-forcing publish properties are set[/+]on Jul 28, 2025
We were able to do something much nicer for the RID-specific tools feature because a) Pack is way less invasive, and b) we control the entire tool packaging process end-to-end. Neither of those are true for Publish, we'll need some serious thought here to make this work without breaking all of the current use cases that rely on implicitly getting a RID set.
We were able to do something much nicer for the RID-specific tools feature because a) Pack is way less invasive, and b) we control the entire tool packaging process end-to-end. Neither of those are true for Publish, we'll need some serious thought here to make this work without breaking all of the current use cases that rely on implicitly getting a RID set.
Pack or build for containers would make more sense (imo) than publish.
Publish, for web projects, was always more of a deployment thing, while containers are more of a build artifact.
Area-ContainersRelated to dotnet SDK containers functionalitymulti-RID-publishingIssues related to the lack of multi-RID publishing semantics in the SDKuntriagedRequest triage from a team member
Activity
[-]Multi-arch container publishing doesn't work when certian RID-forcing publish properties are set[/-][+]Multi-arch container publishing doesn't work when certain RID-forcing publish properties are set[/+]baronfel commentedon Jul 28, 2025
We were able to do something much nicer for the RID-specific tools feature because a) Pack is way less invasive, and b) we control the entire tool packaging process end-to-end. Neither of those are true for Publish, we'll need some serious thought here to make this work without breaking all of the current use cases that rely on implicitly getting a RID set.
ChrisMcKee commentedon Jul 28, 2025
Pack or build for containers would make more sense (imo) than publish.
Publish, for web projects, was always more of a deployment thing, while containers are more of a build artifact.