From c20bd23971ca928f9872c3e8bee379249c8b61dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Jul 2026 18:17:39 +0000 Subject: [PATCH 01/11] Initial plan From e61e548012101637fa122acccdc1bec47cab6d1d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Jul 2026 18:19:51 +0000 Subject: [PATCH 02/11] Fix Snap alias and symlink commands for .NET 10 SDK docs --- docs/core/install/linux-snap-sdk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/install/linux-snap-sdk.md b/docs/core/install/linux-snap-sdk.md index b781041c1480a..648140c128b12 100644 --- a/docs/core/install/linux-snap-sdk.md +++ b/docs/core/install/linux-snap-sdk.md @@ -142,7 +142,7 @@ Snap packages can map an alias to a command provided by the package. By default, For .NET 9 and later: ```bash -sudo snap alias dotnet-sdk-100.dotnet dotnet +sudo snap alias dotnet-sdk-100 dotnet ``` For .NET 8 and earlier: @@ -187,7 +187,7 @@ Try the following steps to fix the issue: Use the following command to create a symbolic link to the snap package. For .NET 9 and later, use the version-specific package name: ```bash - ln -s /snap/dotnet-sdk-100/current/dotnet /usr/local/bin/dotnet + ln -s /snap/dotnet-sdk-100/current/usr/bin/dotnet /usr/local/bin/dotnet ``` For .NET 8 and earlier: From 208f8b06ecde33e461434c894812da63dc7b32ea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Jul 2026 18:58:06 +0000 Subject: [PATCH 03/11] Revise Snap SDK doc for versioned packages and command mapping --- docs/core/install/linux-snap-sdk.md | 99 +++++++++-------------------- 1 file changed, 31 insertions(+), 68 deletions(-) diff --git a/docs/core/install/linux-snap-sdk.md b/docs/core/install/linux-snap-sdk.md index 648140c128b12..8b1411742e8c4 100644 --- a/docs/core/install/linux-snap-sdk.md +++ b/docs/core/install/linux-snap-sdk.md @@ -38,57 +38,53 @@ Your Linux distribution might already include snap. Try running `snap` from a te [!INCLUDE [linux-release-wait](includes/linux-release-wait.md)] -Starting with .NET 9, snap packages for the .NET SDK are published under version-specific identifiers (for example, `dotnet-sdk-90` for .NET 9 and `dotnet-sdk-100` for .NET 10). Prior to .NET 9, all SDK versions were published under the same identifier `dotnet-sdk`, and you specified the version through a channel. Additionally, .NET 9 and later snap packages support both x64 and Arm64 architectures, while earlier versions only support x64. The SDK includes both the ASP.NET Core and .NET runtime, versioned to the SDK. +To install the .NET SDK, use version-specific snap package identifiers because this approach lets you install and manage multiple SDK versions side by side. For example, use `dotnet-sdk-80` for .NET 8 and `dotnet-sdk-100` for .NET 10. The SDK includes both the ASP.NET Core and .NET runtime, versioned to the SDK. After installation, use that version-specific package identifier in the commands in this article. The latest SDK can target earlier runtime versions. > [!TIP] -> The [Snapcraft .NET SDK package page](https://snapcraft.io/dotnet-sdk) ([.NET 9](https://snapcraft.io/dotnet-sdk-90), [.NET 10](https://snapcraft.io/dotnet-sdk-100)) includes distribution-specific instructions on how to install Snapcraft and .NET. +> The [Snapcraft .NET SDK package page](https://snapcraft.io/dotnet-sdk) ([.NET 8](https://snapcraft.io/dotnet-sdk-80), [.NET 9](https://snapcraft.io/dotnet-sdk-90), [.NET 10](https://snapcraft.io/dotnet-sdk-100)) includes distribution-specific instructions on how to install Snapcraft and .NET. 01. Open a terminal. 01. Use `snap install` to install the .NET SDK snap package. The `--classic` parameter is required. - - **For .NET 9 and later** + The following command installs .NET SDK 10: - Install the version-specific package. For example, the following command installs .NET SDK 10: + ```bash + sudo snap install dotnet-sdk-100 --classic + ``` - ```bash - sudo snap install dotnet-sdk-100 --classic - ``` + Replace `100` with the SDK version you want to install, such as `80` for .NET 8 or `90` for .NET 9. - - **For .NET 8 and earlier** +The following table lists the snap packages you can install: - Install from the `dotnet-sdk` package and specify a channel. If this parameter is omitted, `latest/stable` is used. For example, the following command installs .NET SDK 8: +| .NET version | Snap package | +|--------------|------------------| +| 10 (LTS) | `dotnet-sdk-100` | +| 9 (STS) | `dotnet-sdk-90` | +| 8 (LTS) | `dotnet-sdk-80` | - ```bash - sudo snap install dotnet-sdk --classic --channel 8.0/stable - ``` +## 2. Map the dotnet command -The `dotnet` snap alias is automatically created and mapped to the snap package's `dotnet` command. +Because Snap installations don't automatically map the `dotnet` terminal command to the system path, create a symbolic link to make the command available system-wide. -The following table lists the snap packages and channels you can install: +```bash +sudo ln -s /snap/dotnet-sdk-100/current/usr/bin/dotnet /usr/local/bin/dotnet +``` -| .NET version | Snap package or channel | -|--------------|----------------------------------------| -| 10 (LTS) | `dotnet-sdk-100` (preview) | -| 9 (STS) | `dotnet-sdk-90` | -| 8 (LTS) | `dotnet-sdk --channel 8.0/stable` | +To understand the command structure, the symbolic link source path points to the `dotnet` executable under `usr/bin`. -## 2. Export the install location +Replace `100` with the SDK version you installed, such as `80` for .NET 8 or `90` for .NET 9. -The `DOTNET_ROOT` environment variable is often used by tools to determine where .NET is installed. When .NET is installed through Snap, this environment variable isn't configured. You should configure the *DOTNET_ROOT* environment variable in your profile. The path to the snap uses the following format: `/snap/{package}/current`. +## 3. Export the install location -For .NET 9 and later, use the version-specific package name: +Configure the `DOTNET_ROOT` environment variable in your shell profile because tools use it to determine where .NET is installed. Snap installations don't set this variable automatically. The path uses the following format: `/snap/{package}/current/usr/lib/dotnet`. ```bash -export DOTNET_ROOT=/snap/dotnet-sdk-100/current +export DOTNET_ROOT=/snap/dotnet-sdk-100/current/usr/lib/dotnet ``` -For .NET 8 and earlier, use the shared package name: - -```bash -export DOTNET_ROOT=/snap/dotnet-sdk/current -``` +Replace `100` with the SDK version you installed, such as `80` for .NET 8 or `90` for .NET 9. ### Export the environment variable permanently @@ -100,11 +96,13 @@ You can edit your shell profile to permanently add the commands. There are many - **Korn Shell**: _~/.kshrc_ or _.profile_ - **Z Shell**: _~/.zshrc* or _.zprofile_ -Edit the appropriate source file for your shell and add the export command for your installed .NET version. For .NET 9+, use `export DOTNET_ROOT=/snap/dotnet-sdk-100/current` (adjust the version number as needed). For .NET 8 and earlier, use `export DOTNET_ROOT=/snap/dotnet-sdk/current`. +Edit the appropriate source file for your shell, add the export command for your installed .NET version, and save your changes. + +For example: `export DOTNET_ROOT=/snap/dotnet-sdk-100/current/usr/lib/dotnet`. -## 3. Use the .NET CLI +## 4. Use the .NET CLI -Open a terminal and type `dotnet`. +Open a terminal and run the `dotnet` command. ```dotnetcli dotnet @@ -130,27 +128,10 @@ To learn how to use the .NET CLI, see [.NET CLI overview](../tools/index.md). ## Troubleshooting -- [The dotnet terminal command doesn't work](#the-dotnet-terminal-command-doesnt-work) - [Can't install Snap on WSL2](#cant-install-snap-on-wsl2) - [Can't resolve the dotnet command or SDK](#cant-resolve-the-dotnet-command-or-sdk) - [TLS/SSL Certificate errors](#tlsssl-certificate-errors) -### The dotnet terminal command doesn't work - -Snap packages can map an alias to a command provided by the package. By default, the .NET SDK snap packages create an alias for the `dotnet` command. If the alias wasn't created or was previously removed, use the following command to map the alias. - -For .NET 9 and later: - -```bash -sudo snap alias dotnet-sdk-100 dotnet -``` - -For .NET 8 and earlier: - -```bash -sudo snap alias dotnet-sdk.dotnet dotnet -``` - ### Can't install Snap on WSL2 `systemd` must be enabled on the WSL2 instance before Snap can be installed. @@ -175,26 +156,8 @@ It's common for other apps, such as a code IDE or an extension in Visual Studio Try the following steps to fix the issue: -01. Making sure that you [export the `DOTNET_ROOT` environment variable permanently](#export-the-environment-variable-permanently). - -01. Try to symbolic link the snap `dotnet` executable to the location that the program is looking for. - - Two common paths the `dotnet` command is looking for are: - - - `/usr/local/bin/dotnet` - - `/usr/share/dotnet` - - Use the following command to create a symbolic link to the snap package. For .NET 9 and later, use the version-specific package name: - - ```bash - ln -s /snap/dotnet-sdk-100/current/usr/bin/dotnet /usr/local/bin/dotnet - ``` - - For .NET 8 and earlier: - - ```bash - ln -s /snap/dotnet-sdk/current/dotnet /usr/local/bin/dotnet - ``` +01. Complete [2. Map the dotnet command](#2-map-the-dotnet-command). +01. Set the `DOTNET_ROOT` environment variable permanently by following [Export the environment variable permanently](#export-the-environment-variable-permanently). ### TLS/SSL Certificate errors From 7d8439b4dab77969d5062eb14ba190360eedb78e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Jul 2026 19:16:47 +0000 Subject: [PATCH 04/11] docs: remove misleading snap runtime targeting statement --- docs/core/install/linux-snap-sdk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/install/linux-snap-sdk.md b/docs/core/install/linux-snap-sdk.md index 8b1411742e8c4..ae8532533434e 100644 --- a/docs/core/install/linux-snap-sdk.md +++ b/docs/core/install/linux-snap-sdk.md @@ -38,7 +38,7 @@ Your Linux distribution might already include snap. Try running `snap` from a te [!INCLUDE [linux-release-wait](includes/linux-release-wait.md)] -To install the .NET SDK, use version-specific snap package identifiers because this approach lets you install and manage multiple SDK versions side by side. For example, use `dotnet-sdk-80` for .NET 8 and `dotnet-sdk-100` for .NET 10. The SDK includes both the ASP.NET Core and .NET runtime, versioned to the SDK. After installation, use that version-specific package identifier in the commands in this article. The latest SDK can target earlier runtime versions. +To install the .NET SDK, use version-specific snap package identifiers because this approach lets you install and manage multiple SDK versions side by side. For example, use `dotnet-sdk-80` for .NET 8 and `dotnet-sdk-100` for .NET 10. The SDK includes both the ASP.NET Core and .NET runtime, versioned to the SDK. After installation, use that version-specific package identifier in the commands in this article. > [!TIP] > The [Snapcraft .NET SDK package page](https://snapcraft.io/dotnet-sdk) ([.NET 8](https://snapcraft.io/dotnet-sdk-80), [.NET 9](https://snapcraft.io/dotnet-sdk-90), [.NET 10](https://snapcraft.io/dotnet-sdk-100)) includes distribution-specific instructions on how to install Snapcraft and .NET. From e442ecf2a9bb06d0cc532cf4c375ba28fcb4d538 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Jul 2026 19:18:44 +0000 Subject: [PATCH 05/11] docs: remove --classic from snap SDK install command --- docs/core/install/linux-snap-sdk.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/core/install/linux-snap-sdk.md b/docs/core/install/linux-snap-sdk.md index ae8532533434e..bf34930e709f4 100644 --- a/docs/core/install/linux-snap-sdk.md +++ b/docs/core/install/linux-snap-sdk.md @@ -46,12 +46,10 @@ To install the .NET SDK, use version-specific snap package identifiers because t 01. Open a terminal. 01. Use `snap install` to install the .NET SDK snap package. - The `--classic` parameter is required. - The following command installs .NET SDK 10: ```bash - sudo snap install dotnet-sdk-100 --classic + sudo snap install dotnet-sdk-100 ``` Replace `100` with the SDK version you want to install, such as `80` for .NET 8 or `90` for .NET 9. From 7f36b6b671abb3e4a7d725d1dbde545c2b319b16 Mon Sep 17 00:00:00 2001 From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com> Date: Wed, 15 Jul 2026 12:34:57 -0700 Subject: [PATCH 06/11] Revise installation instructions for .NET SDK on Linux Updated the installation date and modified instructions for clarity regarding the .NET SDK snap package installation. Added a note about substituting the package version in commands. --- docs/core/install/linux-snap-sdk.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/core/install/linux-snap-sdk.md b/docs/core/install/linux-snap-sdk.md index bf34930e709f4..2eb59c4e7d175 100644 --- a/docs/core/install/linux-snap-sdk.md +++ b/docs/core/install/linux-snap-sdk.md @@ -3,7 +3,7 @@ title: Install .NET SDK on Linux with Snap description: Learn about how to install the .NET SDK snap package. Canonical maintains and supports .NET-related snap packages. author: adegeo ms.author: adegeo -ms.date: 04/23/2026 +ms.date: 07/15/2026 ms.topic: install-set-up-deploy ms.custom: linux-related-content, updateeachrelease ai-usage: ai-assisted @@ -38,10 +38,10 @@ Your Linux distribution might already include snap. Try running `snap` from a te [!INCLUDE [linux-release-wait](includes/linux-release-wait.md)] -To install the .NET SDK, use version-specific snap package identifiers because this approach lets you install and manage multiple SDK versions side by side. For example, use `dotnet-sdk-80` for .NET 8 and `dotnet-sdk-100` for .NET 10. The SDK includes both the ASP.NET Core and .NET runtime, versioned to the SDK. After installation, use that version-specific package identifier in the commands in this article. +To install the .NET SDK, use version-specific snap package identifiers because this approach lets you install and manage multiple SDK versions side by side. For example, use `dotnet-sdk-80` for .NET 8 and `dotnet-sdk-100` for .NET 10. The SDK includes both the ASP.NET Core and .NET runtime, versioned to the SDK. This article uses the .NET 10 SDK snap package; if you're using a different package, substitute it. > [!TIP] -> The [Snapcraft .NET SDK package page](https://snapcraft.io/dotnet-sdk) ([.NET 8](https://snapcraft.io/dotnet-sdk-80), [.NET 9](https://snapcraft.io/dotnet-sdk-90), [.NET 10](https://snapcraft.io/dotnet-sdk-100)) includes distribution-specific instructions on how to install Snapcraft and .NET. +> The Snapcraft .NET SDK package page ([.NET 8](https://snapcraft.io/dotnet-sdk-80), [.NET 9](https://snapcraft.io/dotnet-sdk-90), [.NET 10](https://snapcraft.io/dotnet-sdk-100)) includes distribution-specific instructions on how to install Snapcraft and .NET. 01. Open a terminal. 01. Use `snap install` to install the .NET SDK snap package. @@ -52,9 +52,7 @@ To install the .NET SDK, use version-specific snap package identifiers because t sudo snap install dotnet-sdk-100 ``` - Replace `100` with the SDK version you want to install, such as `80` for .NET 8 or `90` for .NET 9. - -The following table lists the snap packages you can install: +The following table lists the .NET SDK snap packages you can install: | .NET version | Snap package | |--------------|------------------| @@ -70,10 +68,6 @@ Because Snap installations don't automatically map the `dotnet` terminal command sudo ln -s /snap/dotnet-sdk-100/current/usr/bin/dotnet /usr/local/bin/dotnet ``` -To understand the command structure, the symbolic link source path points to the `dotnet` executable under `usr/bin`. - -Replace `100` with the SDK version you installed, such as `80` for .NET 8 or `90` for .NET 9. - ## 3. Export the install location Configure the `DOTNET_ROOT` environment variable in your shell profile because tools use it to determine where .NET is installed. Snap installations don't set this variable automatically. The path uses the following format: `/snap/{package}/current/usr/lib/dotnet`. From 5ac3ff5afbfd1c13edb19a12c1b12143ecb575d2 Mon Sep 17 00:00:00 2001 From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com> Date: Wed, 15 Jul 2026 12:40:10 -0700 Subject: [PATCH 07/11] Remove linux-release-wait include from SDK install Removed the linux-release-wait include from the installation instructions. --- docs/core/install/linux-snap-sdk.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/core/install/linux-snap-sdk.md b/docs/core/install/linux-snap-sdk.md index 2eb59c4e7d175..861d960021945 100644 --- a/docs/core/install/linux-snap-sdk.md +++ b/docs/core/install/linux-snap-sdk.md @@ -36,8 +36,6 @@ Your Linux distribution might already include snap. Try running `snap` from a te ## 1. Install the SDK -[!INCLUDE [linux-release-wait](includes/linux-release-wait.md)] - To install the .NET SDK, use version-specific snap package identifiers because this approach lets you install and manage multiple SDK versions side by side. For example, use `dotnet-sdk-80` for .NET 8 and `dotnet-sdk-100` for .NET 10. The SDK includes both the ASP.NET Core and .NET runtime, versioned to the SDK. This article uses the .NET 10 SDK snap package; if you're using a different package, substitute it. > [!TIP] From 484ab90a98b9bc658a9bf53c177c51b975572e23 Mon Sep 17 00:00:00 2001 From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com> Date: Wed, 15 Jul 2026 12:49:18 -0700 Subject: [PATCH 08/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- docs/core/install/linux-snap-sdk.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/core/install/linux-snap-sdk.md b/docs/core/install/linux-snap-sdk.md index 861d960021945..a1a37718779c9 100644 --- a/docs/core/install/linux-snap-sdk.md +++ b/docs/core/install/linux-snap-sdk.md @@ -60,8 +60,9 @@ The following table lists the .NET SDK snap packages you can install: ## 2. Map the dotnet command -Because Snap installations don't automatically map the `dotnet` terminal command to the system path, create a symbolic link to make the command available system-wide. +Because Snap doesn't create an unversioned `dotnet` command, create a symbolic link to make `dotnet` available system-wide. +If `/usr/local/bin/dotnet` already exists, remove it before you create the link. ```bash sudo ln -s /snap/dotnet-sdk-100/current/usr/bin/dotnet /usr/local/bin/dotnet ``` From 82d0f9c24b2b2e5353e166a755f682f4981c3719 Mon Sep 17 00:00:00 2001 From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com> Date: Wed, 15 Jul 2026 12:50:11 -0700 Subject: [PATCH 09/11] Add symbolic link instructions for dotnet command Added instructions for creating a symbolic link for dotnet. --- docs/core/install/linux-snap-sdk.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/core/install/linux-snap-sdk.md b/docs/core/install/linux-snap-sdk.md index a1a37718779c9..25f36768162a1 100644 --- a/docs/core/install/linux-snap-sdk.md +++ b/docs/core/install/linux-snap-sdk.md @@ -63,6 +63,7 @@ The following table lists the .NET SDK snap packages you can install: Because Snap doesn't create an unversioned `dotnet` command, create a symbolic link to make `dotnet` available system-wide. If `/usr/local/bin/dotnet` already exists, remove it before you create the link. + ```bash sudo ln -s /snap/dotnet-sdk-100/current/usr/bin/dotnet /usr/local/bin/dotnet ``` From 4b6512eea23ebebabbaa4a8e66e1670b545f0698 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Jul 2026 20:32:22 +0000 Subject: [PATCH 10/11] Add mixed-install warning to intro and symlink scope note in section 2 --- docs/core/install/linux-snap-sdk.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/core/install/linux-snap-sdk.md b/docs/core/install/linux-snap-sdk.md index 25f36768162a1..0239dd5b46f0a 100644 --- a/docs/core/install/linux-snap-sdk.md +++ b/docs/core/install/linux-snap-sdk.md @@ -16,6 +16,9 @@ This article describes how to install the .NET SDK snap package. .NET SDK snap p A snap is a bundle of an app and its dependencies that works across many different Linux distributions. Snaps are discoverable and installable from the Snap Store. For more information about Snap, see [Get started](https://snapcraft.io/docs/tutorials/get-started/#tutorials-get-started). +> [!IMPORTANT] +> If you install .NET with Snap, use Snap to manage all your .NET installations. Avoid mixing Snap with other installation methods, such as a package manager or the scripted install, because mixing methods can cause conflicts. + > [!CAUTION] > Snap installations of .NET may have problems running [.NET tools](../tools/global-tools.md). If you wish to use .NET tools, we recommend that you install .NET using the [`dotnet-install` script](linux-scripted-manual.md#scripted-install) or the package manager for the particular Linux distribution. > @@ -60,7 +63,7 @@ The following table lists the .NET SDK snap packages you can install: ## 2. Map the dotnet command -Because Snap doesn't create an unversioned `dotnet` command, create a symbolic link to make `dotnet` available system-wide. +Because Snap doesn't create an unversioned `dotnet` command, create a symbolic link to make `dotnet` available system-wide. Create this link only if you want to map the `dotnet` command to this specific Snap installation. If you already have .NET installed through another method, creating this link overwrites that mapping. If `/usr/local/bin/dotnet` already exists, remove it before you create the link. From 38e12b6eec861c7c5fd0dda9fa54ed46eacf5703 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Jul 2026 20:32:50 +0000 Subject: [PATCH 11/11] Fix gerund phrase in section 2 symlink scope note --- docs/core/install/linux-snap-sdk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/install/linux-snap-sdk.md b/docs/core/install/linux-snap-sdk.md index 0239dd5b46f0a..ad3949fbf837c 100644 --- a/docs/core/install/linux-snap-sdk.md +++ b/docs/core/install/linux-snap-sdk.md @@ -63,7 +63,7 @@ The following table lists the .NET SDK snap packages you can install: ## 2. Map the dotnet command -Because Snap doesn't create an unversioned `dotnet` command, create a symbolic link to make `dotnet` available system-wide. Create this link only if you want to map the `dotnet` command to this specific Snap installation. If you already have .NET installed through another method, creating this link overwrites that mapping. +Because Snap doesn't create an unversioned `dotnet` command, create a symbolic link to make `dotnet` available system-wide. Create this link only if you want to map the `dotnet` command to this specific Snap installation. If you already have .NET installed through another method and you create this link, it overwrites that mapping. If `/usr/local/bin/dotnet` already exists, remove it before you create the link.