[Breaking change]: .NET SDK Containers default to use the latest
tag instead of $(Version)
#36404
Closed
1 of 3 tasks
Labels
breaking-change
Indicates a .NET Core breaking change
doc-idea
Indicates issues that are suggestions for new topics [org][type][category]
Pri1
High priority, do before Pri2 and Pri3
📌 seQUESTered
Identifies that an issue has been imported into Quest.
Description
The default image tag used for .NET SDK-built Containers changed from the value of the
Version
of the Project to the valuelatest
in .NET 8.0.100 preview 6 with #36404.Version
.NET 8 Preview 6
Previous behavior
Previously, the image would be built with a tag value of
$(Version)
, which enabled changing the tag based on the same value that the rest of the .NET ecosystem uses.New behavior
Now, the generated image will have the
latest
tag in all cases.Type of breaking change
Reason for change
This change aligns the default containerization experience with the developer experiences for other container tooling like the Docker CLI, and makes the dev inner-loop of repeated container publishes in an iterative loop more easy to use with tools like Docker Compose, because the version remains stable.
Recommended action
Explicitly set the version if you need it. The easiest way would be to set the
ContainerImageTag
property on the command line to an explicit version, e.g./p:ContainerImageTag=1.2.3
, but you can also programmatically set the value the same as you would with any other MSBuild property. In a project file you can continue to use the$(Version)
property by adding the following code:Feature area
SDK
Affected APIs
No response
Associated WorkItem - 142258
The text was updated successfully, but these errors were encountered: