-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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:

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:
dotnet new webapidotnet publish /t:PublishContainer /p:InvariantGlobalization=false /p:ContainerRuntimeIdentifier=linux-x64 /p:ContainerFamily=noble-chiseled /bl- Open the MSBuild log with MSBuild Structured Log Viewer