Skip to content

How to use "-extra" base image via InvariantGlobalization? #52160

@baronfel

Description

@baronfel

This is a bug in the containers targets - when we check if we can add the -extra variant to the users' ContainerFamily, we check if the target runtime == 8, not >= 8 (when the -extras first became available).

We should fix this comparison and add tests to the existing targets test to verify the expected behavior.

Discussed in #52158

Originally posted by mu88 December 15, 2025
Hi @baronfel,

When using the .NET SDK Container Building Tools and setting the MSBuild property InvariantGlobalization to false, the base image with the -extra suffix is not used:
image

Based on the log statement Using user-provided ContainerFamily, I was able to find this spot in the code.
However, I'm wondering about why I'm not ending up here 🤔

Do you have a hint for me?

Here's my repro workflow:

  1. dotnet new webapi
  2. dotnet publish /t:PublishContainer /p:InvariantGlobalization=false /p:ContainerRuntimeIdentifier=linux-x64 /p:ContainerFamily=noble-chiseled /bl
  3. Open the MSBuild log with MSBuild Structured Log Viewer

Metadata

Metadata

Assignees

Labels

Area-ContainersRelated to dotnet SDK containers functionality

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions