-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Document .NET 11 SDK local container runtime selection change #55232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
2
commits into
main
Choose a base branch
from
copilot/breaking-change-sdk-container-publishing-again
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+64
−5
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
docs/core/compatibility/sdk/11/native-local-container-runtimes.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| title: "Breaking change: SDK local container runtime selection prefers platform-native tools" | ||
| description: "Learn about the breaking change in .NET 11 where SDK local container runtime selection prefers platform-native tools on Windows and macOS." | ||
| ms.date: 08/04/2026 | ||
| ai-usage: ai-assisted | ||
| --- | ||
|
|
||
| # SDK local container runtime selection prefers platform-native tools | ||
|
|
||
| Starting in .NET 11, when you publish an SDK container to a local container runtime, the SDK automatically prefers platform-native CLIs when they're available: `wslc` on Windows and Apple's `container` CLI on macOS. This change affects which local runtime receives the image when Docker or Podman is also installed. | ||
|
|
||
| ## Version introduced | ||
|
|
||
| .NET 11 Preview 7 | ||
|
|
||
| ## Previous behavior | ||
|
|
||
| Previously, when `LocalRegistry` wasn't explicitly set, the SDK probed Docker and Podman and loaded the published image into the selected Docker or Podman runtime. | ||
|
|
||
| ## New behavior | ||
|
|
||
| Starting in .NET 11, on Windows, the SDK first probes `wslc`. On macOS, the SDK first probes Apple's `container` CLI. If the platform-native tool is available and its service runs, the SDK loads the published image there. Docker and Podman remain fallback options. | ||
|
|
||
| You can explicitly select Docker, Podman, `wslc`, or Apple's `container` CLI through the `LocalRegistry` MSBuild property. | ||
|
|
||
| ## Type of breaking change | ||
|
|
||
| This change is a [behavioral change](../../categories.md#behavioral-change). | ||
|
|
||
| ## Reason for change | ||
|
|
||
| Windows and macOS now provide platform-native container tooling. The SDK gives you the native platform experience while it preserves Docker and Podman fallback behavior. | ||
|
|
||
| For more information, see the [related implementation](https://github.com/dotnet/sdk/pull/55249) and tracking issues [dotnet/sdk-container-builds#651](https://github.com/dotnet/sdk-container-builds/issues/651) and [dotnet/sdk-container-builds#636](https://github.com/dotnet/sdk-container-builds/issues/636). | ||
|
|
||
| ## Recommended action | ||
|
|
||
| If automatic selection works for your workflow, no action is required. | ||
|
|
||
| To keep using a specific runtime, set the `LocalRegistry` MSBuild property explicitly: | ||
|
|
||
| ```dotnetcli | ||
| dotnet publish /t:PublishContainer -p:LocalRegistry=Docker | ||
| ``` | ||
|
|
||
| Use `Docker` or `Podman` to select Docker or Podman. Use `Wslc` on Windows or `MacOSContainer` on macOS to select the platform-native runtime explicitly. | ||
|
|
||
| ## Affected APIs | ||
|
|
||
| - `Microsoft.NET.Build.Containers.KnownLocalRegistryTypes.Wslc` | ||
| - `Microsoft.NET.Build.Containers.KnownLocalRegistryTypes.MacOSContainer` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.