Skip to content
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

[Breaking change]: .NET SDK Containers default to use the latest tag instead of $(Version) #36404

Closed
1 of 3 tasks
baronfel opened this issue Jul 26, 2023 · 0 comments · Fixed by #36433
Closed
1 of 3 tasks
Assignees
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.

Comments

@baronfel
Copy link
Member

baronfel commented Jul 26, 2023

Description

The default image tag used for .NET SDK-built Containers changed from the value of the Version of the Project to the value latest 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

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.
  • Behavioral change: Existing binaries may behave differently at run time.

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:

<PropertyGroup>
  <ContainerImageTag>$(Version)</ContainerImageTag>
</PropertyGroup>

Feature area

SDK

Affected APIs

No response


Associated WorkItem - 142258

@baronfel baronfel added doc-idea Indicates issues that are suggestions for new topics [org][type][category] breaking-change Indicates a .NET Core breaking change Pri1 High priority, do before Pri2 and Pri3 labels Jul 26, 2023
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Jul 26, 2023
@gewarren gewarren added 🗺️ reQUEST Triggers an issue to be imported into Quest. and removed ⌚ Not Triaged Not triaged labels Jul 26, 2023
@github-actions github-actions bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Jul 27, 2023
@ghost ghost added the in-pr This issue will be closed (fixed) by an active pull request. label Jul 28, 2023
@ghost ghost removed the in-pr This issue will be closed (fixed) by an active pull request. label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants