Skip to content

Commit d7778f9

Browse files
committed
install: update install-from-source to use .NET 10.0
The project now targets net10.0 but the install-from-source script still referenced .NET SDK 8.0. Update all references to 10.0 and fix the version parsing to use field-based extraction instead of fixed-width character slicing, which broke for two-digit major versions. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent d8846d1 commit d7778f9

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ the preferred install method for Linux because you can use it to install on any
210210
distribution][dotnet-supported-distributions]. You
211211
can also use this method on macOS if you so choose.
212212

213-
**Note:** Make sure you have installed [version 8.0 of the .NET
213+
**Note:** Make sure you have installed [version 10.0 of the .NET
214214
SDK][dotnet-install] before attempting to run the following `dotnet tool`
215215
commands. After installing, you will also need to follow the output instructions
216216
to add the tools directory to your `PATH`.

src/linux/Packaging.Linux/install-from-source.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ensure_dotnet_installed() {
9191
if [ -z "$(verify_existing_dotnet_installation)" ]; then
9292
curl -LO https://dot.net/v1/dotnet-install.sh
9393
chmod +x ./dotnet-install.sh
94-
bash -c "./dotnet-install.sh --channel 8.0"
94+
bash -c "./dotnet-install.sh --channel 10.0"
9595

9696
# Since we have to run the dotnet install script with bash, dotnet isn't
9797
# added to the process PATH, so we manually add it here.
@@ -103,10 +103,10 @@ ensure_dotnet_installed() {
103103

104104
verify_existing_dotnet_installation() {
105105
# Get initial pieces of installed sdk version(s).
106-
sdks=$(dotnet --list-sdks | cut -c 1-3)
106+
sdks=$(dotnet --list-sdks | cut -d' ' -f1 | cut -d. -f1,2)
107107

108108
# If we have a supported version installed, return.
109-
supported_dotnet_versions="8.0"
109+
supported_dotnet_versions="10.0"
110110
for v in $supported_dotnet_versions; do
111111
if [ $(echo $sdks | grep "$v") ]; then
112112
echo $sdks
@@ -185,7 +185,7 @@ case "$distribution" in
185185
$sudo_cmd apt update
186186
$sudo_cmd apt install apt-transport-https -y
187187
$sudo_cmd apt update
188-
$sudo_cmd apt install dotnet-sdk-8.0 dpkg-dev -y
188+
$sudo_cmd apt install dotnet-sdk-10.0 dpkg-dev -y
189189
fi
190190
fi
191191
;;

0 commit comments

Comments
 (0)