diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json index 5d553bcd0..397f9a191 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.", @@ -11,6 +11,7 @@ "latest", "lts", "none", + "10.0-preview", "8.0", "7.0", "6.0" diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh index 4e149e2f0..75f013d03 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 suffixed with the version label + clean_version="$(echo "$version" | sed 's/-preview$//')" + install_sdk "$clean_version" done for version in "${dotnetRuntimeVersions[@]}"; do 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/test/dotnet/install_dotnet_multiple_versions.sh b/test/dotnet/install_dotnet_multiple_versions.sh index 87bf8caf4..482c307b9 100644 --- a/test/dotnet/install_dotnet_multiple_versions.sh +++ b/test/dotnet/install_dotnet_multiple_versions.sh @@ -22,14 +22,8 @@ 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 5.0 installed" \ -is_dotnet_sdk_version_installed "5.0" - -check ".NET Core SDK 3.1 installed" \ -is_dotnet_sdk_version_installed "3.1" +check ".NET SDK 10.0 installed" \ +is_dotnet_sdk_version_installed "10.0" check "Build example class library" \ dotnet build projects/multitargeting @@ -43,14 +37,8 @@ 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 5.0 project" \ -dotnet run --project projects/net5.0 - -check "Build and run .NET Core 3.1 project" \ -dotnet run --project projects/netcoreapp3.1 +check "Build and run .NET 10.0 project" \ +dotnet run --project projects/net10.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_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