dotnet: add support for prerelease versions - #1470
Merged
Álvaro Rausell Guiard (AlvaroRausell) merged 4 commits intoSep 16, 2025
Merged
dotnet: add support for prerelease versions#1470Álvaro Rausell Guiard (AlvaroRausell) merged 4 commits into
Álvaro Rausell Guiard (AlvaroRausell) merged 4 commits into
Conversation
Contributor
Author
Contributor
Author
|
Friendly bump This is ready for review |
Kaniska (Kaniska244)
approved these changes
Sep 15, 2025
Contributor
There was a problem hiding this comment.
Hello Steven (@sliekens) ,
Thank you for the contribution. The change looks fine. To be reviewed further by maintainers.
Álvaro Rausell Guiard (AlvaroRausell)
approved these changes
Sep 16, 2025
Álvaro Rausell Guiard (AlvaroRausell)
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the great work!
Álvaro Rausell Guiard (AlvaroRausell)
merged commit Sep 16, 2025
572770d
into
devcontainers:main
12 checks passed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #1469
This PR adds official support for installing dotnet prereleases by adding
-previewor-dailyto the version.New configuration options
Supported configurations for
version,additionalVersions,dotnetRuntimeVersionsandaspnetCoreRuntimeVersions:10.0-preview10.0-dailySupported configurations for
versionandadditionalVersionsonly:10.0.1xx-preview10.0.1xx-dailyI believe this change is fully backwards compatible.
Importantly, this syntax will always give you a prerelease version, even if a newer GA version is available. For example, a version spec like
"8.0.1xx-preview"gives you a release candidate build of 8.0.0 (8.0.100-rc.2.23502.2) while the latest GA is 8.0.19.High level implementation
dotnet-install.sh) to the latest version from https://dot.net/v1/dotnet-install.shparse_version_and_quality()which converts version specs to a version with a quality"10.0-preview"=>"10.0 preview""10.0-daily"=>"10.0 daily""10.0"=>"10.0 GA""10.0.1xx"=>"10.0.1xx GA""10.0.100"=>"10.0.100"read -ris used to split the strings above into variablesclean_versionandqualityinstall_sdkandinstall_runtimeto take an optionalqualityargument and pass it on to thedotnet-install.shscript--channelcould be passed to the dotnet-install script (which worked but was certainly weird)2.3.0to2.4.0Tests
For testing, I added two new test scenarios:
install_dotnet_preview: tests for10.0-previewand10.0.1xx-previewinstall_dotnet_daily: tests for10.0-dailyand10.0.1xx-dailyChanges to existing test cases:
install_dotnet_multiple_versions: change10.0-previewto10.0to ensure this also still worksinstall_dotnet_multiple_versions_preview: removed because it is now redundantDocumentation
devcontainer-feature.json.NOTES.mdRemarks
Note that
"version": "10.0"currently resolves to a preview version, but this is an implementation detail of the underlyingdotnet-installscript and the expectation is that it will resolve to a GA build some time in November.