From 28f5a93e3f97488c8856a93cd2fdb0f59cce877e Mon Sep 17 00:00:00 2001 From: Kaniska Date: Fri, 21 Mar 2025 15:11:09 +0000 Subject: [PATCH 01/14] Supporting dotnet 10.0 preview version --- src/dotnet/devcontainer-feature.json | 3 +- src/dotnet/scripts/vendor/README.md | 1 + src/dotnet/scripts/vendor/dotnet-install.sh | 2 -- .../install_dotnet_multiple_versions.sh | 8 ++--- test/dotnet/projects/net10.0/Program.cs | 32 +++++++++++++++++++ .../projects/net10.0/example_project.csproj | 14 ++++++++ test/dotnet/scenarios.json | 4 +-- 7 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 test/dotnet/projects/net10.0/Program.cs create mode 100644 test/dotnet/projects/net10.0/example_project.csproj diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json index 600997dde..108592b4d 100644 --- a/src/dotnet/devcontainer-feature.json +++ b/src/dotnet/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "dotnet", - "version": "2.2.0", + "version": "2.3.0", "name": "Dotnet CLI", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet", "description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.", @@ -11,6 +11,7 @@ "latest", "lts", "none", + "10.0", "8.0", "7.0", "6.0" diff --git a/src/dotnet/scripts/vendor/README.md b/src/dotnet/scripts/vendor/README.md index 181b53781..9e330e524 100644 --- a/src/dotnet/scripts/vendor/README.md +++ b/src/dotnet/scripts/vendor/README.md @@ -23,5 +23,6 @@ dotnet-install.sh [--version latest] --channel 6.0 [--quality GA] dotnet-install.sh [--version latest] --channel 6.0.4xx [--quality GA] dotnet-install.sh [--version latest] --channel 8.0 --quality preview dotnet-install.sh [--version latest] --channel 8.0 --quality daily +dotnet-install.sh [--version latest] --channel 10.0 --quality preview dotnet-install.sh --version 6.0.413 ``` \ No newline at end of file diff --git a/src/dotnet/scripts/vendor/dotnet-install.sh b/src/dotnet/scripts/vendor/dotnet-install.sh index 122ee68ed..d50bd6c2b 100755 --- a/src/dotnet/scripts/vendor/dotnet-install.sh +++ b/src/dotnet/scripts/vendor/dotnet-install.sh @@ -1396,9 +1396,7 @@ get_feeds_to_use() { feeds=( "https://builds.dotnet.microsoft.com/dotnet" - "https://dotnetcli.azureedge.net/dotnet" "https://ci.dot.net/public" - "https://dotnetbuilds.azureedge.net/public" ) if [[ -n "$azure_feed" ]]; then diff --git a/test/dotnet/install_dotnet_multiple_versions.sh b/test/dotnet/install_dotnet_multiple_versions.sh index 87bf8caf4..56ebcce14 100644 --- a/test/dotnet/install_dotnet_multiple_versions.sh +++ b/test/dotnet/install_dotnet_multiple_versions.sh @@ -25,8 +25,8 @@ is_dotnet_sdk_version_installed "7.0" check ".NET SDK 6.0 installed" \ is_dotnet_sdk_version_installed "6.0" -check ".NET SDK 5.0 installed" \ -is_dotnet_sdk_version_installed "5.0" +check ".NET SDK 10.0 installed" \ +is_dotnet_sdk_version_installed "10.0" check ".NET Core SDK 3.1 installed" \ is_dotnet_sdk_version_installed "3.1" @@ -46,8 +46,8 @@ dotnet run --project projects/net7.0 check "Build and run .NET 6.0 project" \ dotnet run --project projects/net6.0 -check "Build and run .NET 5.0 project" \ -dotnet run --project projects/net5.0 +check "Build and run .NET 10.0 project" \ +dotnet run --project projects/net10.0 check "Build and run .NET Core 3.1 project" \ dotnet run --project projects/netcoreapp3.1 diff --git a/test/dotnet/projects/net10.0/Program.cs b/test/dotnet/projects/net10.0/Program.cs new file mode 100644 index 000000000..59fb426af --- /dev/null +++ b/test/dotnet/projects/net10.0/Program.cs @@ -0,0 +1,32 @@ +using Newtonsoft.Json; + +string json = """ +{ + "Name": "Inception", + "ReleaseDate": "2010-07-08T00:00:00", + "Genres": [ + "Action", + "Thriller" + ] +} +"""; + +Movie? m = JsonConvert.DeserializeObject(json); + +if (m == default) +{ + Console.WriteLine("Decoding failed!"); +} +else +{ + Console.WriteLine($"Movie name: {m.Name}"); + Console.WriteLine($"Release Date: {m.ReleaseDate}"); + Console.WriteLine($"Genres: {string.Join(", ", m.Genres)}"); +} + +class Movie(string? name, DateTime releaseDate, List? genres) +{ + public string Name { get; set; } = name ?? "Default Name"; + public DateTime ReleaseDate { get; set; } = releaseDate; + public List Genres { get; set; } = genres ?? []; +} \ No newline at end of file diff --git a/test/dotnet/projects/net10.0/example_project.csproj b/test/dotnet/projects/net10.0/example_project.csproj new file mode 100644 index 000000000..9998d0e3a --- /dev/null +++ b/test/dotnet/projects/net10.0/example_project.csproj @@ -0,0 +1,14 @@ + + + + Exe + net10.0 + enable + enable + + + + + + + \ No newline at end of file diff --git a/test/dotnet/scenarios.json b/test/dotnet/scenarios.json index 641753632..a734740e4 100644 --- a/test/dotnet/scenarios.json +++ b/test/dotnet/scenarios.json @@ -40,12 +40,12 @@ "remoteUser": "vscode", "features": { "dotnet": { - "version": "9.0", + "version": "10.0", "additionalVersions": [ + "9.0", "8.0", "7.0", "6.0", - "5.0", "3.1" ] } From d2855d9ed5e76ad37dad3782e568cfff03b13d2f Mon Sep 17 00:00:00 2001 From: Kaniska Date: Wed, 9 Apr 2025 13:41:31 +0000 Subject: [PATCH 02/14] Changing the test to fetch actual LTS version. --- test/dotnet/dotnet_helpers.sh | 38 +++++++++++++++++++++++++++++++ test/dotnet/install_dotnet_lts.sh | 3 ++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/test/dotnet/dotnet_helpers.sh b/test/dotnet/dotnet_helpers.sh index 01e554f66..0373d99c7 100644 --- a/test/dotnet/dotnet_helpers.sh +++ b/test/dotnet/dotnet_helpers.sh @@ -17,6 +17,44 @@ fetch_latest_version_in_channel() { fi } +# Function to resolve the actual version from an aka.ms URL +resolve_version_from_aka_ms() { + local normalized_channel="${1:-LTS}" # defaulting to LTS channel + local normalized_product="dotnet-sdk" + local normalized_os="linux" + + # Dynamically determine the architecture + local normalized_architecture + normalized_architecture=$(uname -m) + case "$normalized_architecture" in + x86_64) normalized_architecture="x64" ;; + aarch64) normalized_architecture="arm64" ;; + arm*) normalized_architecture="arm" ;; + *) + echo "Unsupported architecture: $normalized_architecture" + return 1 + ;; + esac + + # Construct the aka.ms link + local aka_ms_link="https://aka.ms/dotnet/$normalized_channel/$normalized_product-$normalized_os-$normalized_architecture.tar.gz" + echo "Constructed aka.ms link: $aka_ms_link" + + # Resolve the redirect URL using curl + local resolved_url + resolved_url=$(curl -s -L -o /dev/null -w "%{url_effective}" "$aka_ms_link") + echo "Resolved URL: $resolved_url" + + # Extract the version from the resolved URL + IFS='/' + read -ra pathElems <<< "$resolved_url" + local count=${#pathElems[@]} + local specific_version="${pathElems[count-2]}" + unset IFS + + echo "Extracted version: $specific_version" +} + # Prints the latest dotnet version # Usage: fetch_latest_version [] # Example: fetch_latest_version diff --git a/test/dotnet/install_dotnet_lts.sh b/test/dotnet/install_dotnet_lts.sh index da9175c15..aebc8830a 100644 --- a/test/dotnet/install_dotnet_lts.sh +++ b/test/dotnet/install_dotnet_lts.sh @@ -13,7 +13,8 @@ source dev-container-features-test-lib source dotnet_env.sh source dotnet_helpers.sh -expected=$(fetch_latest_version_in_channel "LTS") +# Changing it as the dotnet SDK CDN url is not showing the right version for LTS +expected=$(resolve_version_from_aka_ms "LTS" | cut -d' ' -f3) check "Latest LTS version installed" \ is_dotnet_sdk_version_installed "$expected" From e0501a4b01d5540bda98e7836c3cc15938fc8339 Mon Sep 17 00:00:00 2001 From: Kaniska Date: Wed, 9 Apr 2025 13:51:09 +0000 Subject: [PATCH 03/14] To resolve the conflict --- src/dotnet/devcontainer-feature.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json index 108592b4d..ade56af87 100644 --- a/src/dotnet/devcontainer-feature.json +++ b/src/dotnet/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "dotnet", - "version": "2.3.0", + "version": "2.2.1", "name": "Dotnet CLI", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet", "description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.", @@ -50,7 +50,7 @@ "vscode": { "extensions": [ "ms-dotnettools.csharp" - ] + ] } }, "installsAfter": [ From 6a504bda846504eb1adde400483d8cf360231117 Mon Sep 17 00:00:00 2001 From: Kaniska Date: Wed, 9 Apr 2025 13:54:10 +0000 Subject: [PATCH 04/14] To resolve conflict again --- src/dotnet/devcontainer-feature.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json index ade56af87..6a24271c0 100644 --- a/src/dotnet/devcontainer-feature.json +++ b/src/dotnet/devcontainer-feature.json @@ -50,7 +50,7 @@ "vscode": { "extensions": [ "ms-dotnettools.csharp" - ] + ] } }, "installsAfter": [ From f9dc5a784448683ffea2bb025ee221091d854ead Mon Sep 17 00:00:00 2001 From: Kaniska Date: Wed, 9 Apr 2025 14:04:54 +0000 Subject: [PATCH 05/14] Version bump and adding back the azureedge url's as those should be removed by the automated version update PR --- src/dotnet/devcontainer-feature.json | 2 +- src/dotnet/scripts/vendor/dotnet-install.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json index 6a24271c0..108592b4d 100644 --- a/src/dotnet/devcontainer-feature.json +++ b/src/dotnet/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "dotnet", - "version": "2.2.1", + "version": "2.3.0", "name": "Dotnet CLI", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet", "description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.", diff --git a/src/dotnet/scripts/vendor/dotnet-install.sh b/src/dotnet/scripts/vendor/dotnet-install.sh index d50bd6c2b..122ee68ed 100755 --- a/src/dotnet/scripts/vendor/dotnet-install.sh +++ b/src/dotnet/scripts/vendor/dotnet-install.sh @@ -1396,7 +1396,9 @@ get_feeds_to_use() { feeds=( "https://builds.dotnet.microsoft.com/dotnet" + "https://dotnetcli.azureedge.net/dotnet" "https://ci.dot.net/public" + "https://dotnetbuilds.azureedge.net/public" ) if [[ -n "$azure_feed" ]]; then From 481d6e4c6e9de1256a0d6aab70595e4772253ee2 Mon Sep 17 00:00:00 2001 From: Kaniska Date: Wed, 9 Apr 2025 14:06:32 +0000 Subject: [PATCH 06/14] To resolve conflict again --- src/dotnet/devcontainer-feature.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json index 108592b4d..6a24271c0 100644 --- a/src/dotnet/devcontainer-feature.json +++ b/src/dotnet/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "dotnet", - "version": "2.3.0", + "version": "2.2.1", "name": "Dotnet CLI", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet", "description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.", From 34ff0c455413e5d775793e06058bdfe28343608f Mon Sep 17 00:00:00 2001 From: Kaniska Date: Wed, 9 Apr 2025 20:13:26 +0530 Subject: [PATCH 07/14] Final version bump --- src/dotnet/devcontainer-feature.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json index 4281a5e53..1cecb2d85 100644 --- a/src/dotnet/devcontainer-feature.json +++ b/src/dotnet/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "dotnet", - "version": "2.2.1", + "version": "2.3.0", "name": "Dotnet CLI", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet", "description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.", From 893ca636bc4c29ee7a9fb882a22ec1a6b9e00127 Mon Sep 17 00:00:00 2001 From: Kaniska Date: Mon, 14 Apr 2025 13:38:24 +0000 Subject: [PATCH 08/14] Reverting back the test script change as created separate PR for that. --- test/dotnet/dotnet_helpers.sh | 38 ------------------------------- test/dotnet/install_dotnet_lts.sh | 3 +-- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/test/dotnet/dotnet_helpers.sh b/test/dotnet/dotnet_helpers.sh index 0373d99c7..01e554f66 100644 --- a/test/dotnet/dotnet_helpers.sh +++ b/test/dotnet/dotnet_helpers.sh @@ -17,44 +17,6 @@ fetch_latest_version_in_channel() { fi } -# Function to resolve the actual version from an aka.ms URL -resolve_version_from_aka_ms() { - local normalized_channel="${1:-LTS}" # defaulting to LTS channel - local normalized_product="dotnet-sdk" - local normalized_os="linux" - - # Dynamically determine the architecture - local normalized_architecture - normalized_architecture=$(uname -m) - case "$normalized_architecture" in - x86_64) normalized_architecture="x64" ;; - aarch64) normalized_architecture="arm64" ;; - arm*) normalized_architecture="arm" ;; - *) - echo "Unsupported architecture: $normalized_architecture" - return 1 - ;; - esac - - # Construct the aka.ms link - local aka_ms_link="https://aka.ms/dotnet/$normalized_channel/$normalized_product-$normalized_os-$normalized_architecture.tar.gz" - echo "Constructed aka.ms link: $aka_ms_link" - - # Resolve the redirect URL using curl - local resolved_url - resolved_url=$(curl -s -L -o /dev/null -w "%{url_effective}" "$aka_ms_link") - echo "Resolved URL: $resolved_url" - - # Extract the version from the resolved URL - IFS='/' - read -ra pathElems <<< "$resolved_url" - local count=${#pathElems[@]} - local specific_version="${pathElems[count-2]}" - unset IFS - - echo "Extracted version: $specific_version" -} - # Prints the latest dotnet version # Usage: fetch_latest_version [] # Example: fetch_latest_version diff --git a/test/dotnet/install_dotnet_lts.sh b/test/dotnet/install_dotnet_lts.sh index aebc8830a..da9175c15 100644 --- a/test/dotnet/install_dotnet_lts.sh +++ b/test/dotnet/install_dotnet_lts.sh @@ -13,8 +13,7 @@ source dev-container-features-test-lib source dotnet_env.sh source dotnet_helpers.sh -# Changing it as the dotnet SDK CDN url is not showing the right version for LTS -expected=$(resolve_version_from_aka_ms "LTS" | cut -d' ' -f3) +expected=$(fetch_latest_version_in_channel "LTS") check "Latest LTS version installed" \ is_dotnet_sdk_version_installed "$expected" From 8040226950559da2ae85b7069c235f834f69e0d8 Mon Sep 17 00:00:00 2001 From: Kaniska Date: Tue, 27 May 2025 15:30:49 +0000 Subject: [PATCH 09/14] Ubuntu EOL changes and additional info about dotnet 10.0-preview version. --- src/dotnet/README.md | 2 ++ src/dotnet/devcontainer-feature.json | 1 + test/dotnet/install_dotnet_multiple_versions.sh | 12 ------------ test/dotnet/install_dotnet_specific_release.sh | 6 +++--- ...stall_dotnet_specific_release_and_feature_band.sh | 6 +++--- test/dotnet/scenarios.json | 12 +++++------- 6 files changed, 14 insertions(+), 25 deletions(-) diff --git a/src/dotnet/README.md b/src/dotnet/README.md index fecaeb3f3..f5a483c1f 100644 --- a/src/dotnet/README.md +++ b/src/dotnet/README.md @@ -21,6 +21,8 @@ This Feature installs the latest .NET SDK, which includes the .NET CLI and the s | aspNetCoreRuntimeVersions | Enter additional ASP.NET Core runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version. | string | - | | workloads | Enter additional .NET SDK workloads, separated by commas. Use 'dotnet workload search' to learn what workloads are available to install. | string | - | +The dotnet '10.0' version provided as option is only the dotnet '10.0-preview' version. The dotnet '10.0' stable version is expected to be released by end of 2025. The preview version is still under development and is generally not supported for production use. + ## Customizations ### VS Code Extensions diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json index 1cecb2d85..a8b6741c8 100644 --- a/src/dotnet/devcontainer-feature.json +++ b/src/dotnet/devcontainer-feature.json @@ -11,6 +11,7 @@ "latest", "lts", "none", + // This below dotnet 10 is the dotnet 10.0-preview version. Please check the readme file for more details. "10.0", "8.0", "7.0", diff --git a/test/dotnet/install_dotnet_multiple_versions.sh b/test/dotnet/install_dotnet_multiple_versions.sh index 56ebcce14..482c307b9 100644 --- a/test/dotnet/install_dotnet_multiple_versions.sh +++ b/test/dotnet/install_dotnet_multiple_versions.sh @@ -22,15 +22,9 @@ is_dotnet_sdk_version_installed "8.0" check ".NET SDK 7.0 installed" \ is_dotnet_sdk_version_installed "7.0" -check ".NET SDK 6.0 installed" \ -is_dotnet_sdk_version_installed "6.0" - check ".NET SDK 10.0 installed" \ is_dotnet_sdk_version_installed "10.0" -check ".NET Core SDK 3.1 installed" \ -is_dotnet_sdk_version_installed "3.1" - check "Build example class library" \ dotnet build projects/multitargeting @@ -43,15 +37,9 @@ dotnet run --project projects/net8.0 check "Build and run .NET 7.0 project" \ dotnet run --project projects/net7.0 -check "Build and run .NET 6.0 project" \ -dotnet run --project projects/net6.0 - check "Build and run .NET 10.0 project" \ dotnet run --project projects/net10.0 -check "Build and run .NET Core 3.1 project" \ -dotnet run --project projects/netcoreapp3.1 - # Report results # If any of the checks above exited with a non-zero exit code, the test will fail. reportResults \ No newline at end of file diff --git a/test/dotnet/install_dotnet_specific_release.sh b/test/dotnet/install_dotnet_specific_release.sh index 207e58280..0d01bb4da 100644 --- a/test/dotnet/install_dotnet_specific_release.sh +++ b/test/dotnet/install_dotnet_specific_release.sh @@ -13,13 +13,13 @@ source dev-container-features-test-lib source dotnet_env.sh source dotnet_helpers.sh -expected=$(fetch_latest_version_in_channel "3.1") +expected=$(fetch_latest_version_in_channel "8.0") -check ".NET Core SDK 3.1 installed" \ +check ".NET Core SDK 8.0 installed" \ is_dotnet_sdk_version_installed "$expected" check "Build and run example project" \ -dotnet run --project projects/netcoreapp3.1 +dotnet run --project projects/net8.0 # Report results # If any of the checks above exited with a non-zero exit code, the test will fail. diff --git a/test/dotnet/install_dotnet_specific_release_and_feature_band.sh b/test/dotnet/install_dotnet_specific_release_and_feature_band.sh index 51f5c582b..9820217f2 100644 --- a/test/dotnet/install_dotnet_specific_release_and_feature_band.sh +++ b/test/dotnet/install_dotnet_specific_release_and_feature_band.sh @@ -13,11 +13,11 @@ source dev-container-features-test-lib source dotnet_env.sh source dotnet_helpers.sh -check ".NET SDK 5.0.3xx installed" \ -is_dotnet_sdk_version_installed "5.0.3" +check ".NET SDK 8.0.3xx installed" \ +is_dotnet_sdk_version_installed "8.0.3" check "Build and run example project" \ -dotnet run --project projects/net5.0 +dotnet run --project projects/net8.0 # Report results # If any of the checks above exited with a non-zero exit code, the test will fail. diff --git a/test/dotnet/scenarios.json b/test/dotnet/scenarios.json index a734740e4..3b09d66a7 100644 --- a/test/dotnet/scenarios.json +++ b/test/dotnet/scenarios.json @@ -9,20 +9,20 @@ } }, "install_dotnet_specific_release": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "remoteUser": "vscode", "features": { "dotnet": { - "version": "3.1" + "version": "8.0" } } }, "install_dotnet_specific_release_and_feature_band": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", "remoteUser": "vscode", "features": { "dotnet": { - "version": "5.0.3xx" + "version": "8.0.3xx" } } }, @@ -44,9 +44,7 @@ "additionalVersions": [ "9.0", "8.0", - "7.0", - "6.0", - "3.1" + "7.0" ] } } From ea297dde31abd9015b087905d48a893ddc4dfe1b Mon Sep 17 00:00:00 2001 From: Kaniska Date: Tue, 3 Jun 2025 15:03:26 +0000 Subject: [PATCH 10/14] Correcting the comment. --- src/dotnet/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet/README.md b/src/dotnet/README.md index f5a483c1f..a92119a94 100644 --- a/src/dotnet/README.md +++ b/src/dotnet/README.md @@ -21,7 +21,7 @@ This Feature installs the latest .NET SDK, which includes the .NET CLI and the s | aspNetCoreRuntimeVersions | Enter additional ASP.NET Core runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version. | string | - | | workloads | Enter additional .NET SDK workloads, separated by commas. Use 'dotnet workload search' to learn what workloads are available to install. | string | - | -The dotnet '10.0' version provided as option is only the dotnet '10.0-preview' version. The dotnet '10.0' stable version is expected to be released by end of 2025. The preview version is still under development and is generally not supported for production use. +The dotnet '10.0' option currently points to the '10.0-preview' version of dotnet. The dotnet '10.0' stable version is expected to be released by end of 2025. The preview version is still under development and is generally not supported for production use. ## Customizations From 56fcbdddbf08fc1c947c283d551d78c9450225e5 Mon Sep 17 00:00:00 2001 From: Kaniska Date: Thu, 5 Jun 2025 16:28:36 +0000 Subject: [PATCH 11/14] Updates based on review comments to use '-preview' in the label as suffix. --- src/dotnet/devcontainer-feature.json | 3 +- src/dotnet/install.sh | 4 +- ...nstall_dotnet_multiple_versions_preview.sh | 47 +++++++++++++++++++ test/dotnet/scenarios.json | 16 ++++++- 4 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 test/dotnet/install_dotnet_multiple_versions_preview.sh diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json index a8b6741c8..397f9a191 100644 --- a/src/dotnet/devcontainer-feature.json +++ b/src/dotnet/devcontainer-feature.json @@ -11,8 +11,7 @@ "latest", "lts", "none", - // This below dotnet 10 is the dotnet 10.0-preview version. Please check the readme file for more details. - "10.0", + "10.0-preview", "8.0", "7.0", "6.0" diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh index 4e149e2f0..910f5e4fa 100644 --- a/src/dotnet/install.sh +++ b/src/dotnet/install.sh @@ -108,7 +108,9 @@ done check_packages wget ca-certificates icu-devtools for version in "${versions[@]}"; do - install_sdk "$version" + # Remove '-preview' from version if present + clean_version="$(echo "$version" | sed 's/-preview$//')" + install_sdk "$clean_version" done for version in "${dotnetRuntimeVersions[@]}"; do diff --git a/test/dotnet/install_dotnet_multiple_versions_preview.sh b/test/dotnet/install_dotnet_multiple_versions_preview.sh new file mode 100644 index 000000000..76bfd1ae3 --- /dev/null +++ b/test/dotnet/install_dotnet_multiple_versions_preview.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +set -e + +# Optional: Import test library bundled with the devcontainer CLI +# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib +# Provides the 'check' and 'reportResults' commands. +source dev-container-features-test-lib + +# Feature-specific tests +# The 'check' command comes from the dev-container-features-test-lib. Syntax is... +# check