Skip to content

Commit 8306c6d

Browse files
authored
Clarify workload installs by SDK and app targets (#36243)
1 parent 01ee9a2 commit 8306c6d

File tree

1 file changed

+32
-13
lines changed

1 file changed

+32
-13
lines changed

aspnetcore/blazor/webassembly-build-tools-and-aot.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,40 @@ This article describes the build tools for standalone Blazor WebAssembly apps an
1616

1717
## .NET WebAssembly build tools
1818

19-
The .NET WebAssembly build tools are based on [Emscripten](https://emscripten.org/), a compiler toolchain for the web platform. To install the build tools, use ***either*** of the following approaches:
19+
The .NET WebAssembly build tools are based on [Emscripten](https://emscripten.org/), a compiler toolchain for the web platform.
2020

21-
* For the **ASP.NET and web development** workload in the Visual Studio installer, select the **.NET WebAssembly build tools** option from the list of optional components.
22-
* Execute `dotnet workload install wasm-tools` in an administrative command shell.
21+
To install the build tools as a .NET workload, use ***either*** of the following approaches:
2322

24-
> [!NOTE]
25-
> .NET WebAssembly build tools for .NET 6 projects
26-
>
27-
> The `wasm-tools` workload installs the build tools for the latest release. However, the current version of the build tools are incompatible with existing projects built with .NET 6. Projects using the build tools that must support both .NET 6 and a later release must use multi-targeting.
28-
>
29-
> Use the `wasm-tools-net6` workload for .NET 6 projects when developing apps with the .NET 7 SDK. To install the `wasm-tools-net6` workload, execute the following command from an administrative command shell:
30-
>
31-
> ```dotnetcli
32-
> dotnet workload install wasm-tools-net6
33-
> ```
23+
* For the **ASP.NET and web development** workload in the Visual Studio installer, select the **.NET WebAssembly build tools** option from the list of optional components. The option ensures the following:
24+
* The workload is installed for the latest .NET SDK.
25+
* When a new version of Visual Studio is released and it contains a new .NET SDK, the option installs the workload for the new SDK.
26+
* Alternatively, execute the following command in an *administrative command shell* to install the latest workload to the latest .NET SDK available on the system:
27+
28+
```dotnetcli
29+
dotnet workload install wasm-tools
30+
```
31+
32+
To target a prior .NET release with a given .NET SDK, install the `wasm-tools-net{MAJOR VERSION}` workload:
33+
34+
* The `{MAJOR VERSION}` placeholder is replaced with the major version number of the .NET release you want to target (for example, `wasm-tools-net8` for .NET 8).
35+
* Workloads are installed per .NET SDK. Installing the `wasm-tools` workload for one SDK doesn't make it available to other SDKs on the system.
36+
* You must install the appropriate workload for each .NET SDK version you intend to use.
37+
38+
The following list shows which workload to install for each .NET SDK, depending on the apps that you plan to target. Although multiple rows may contain the same workload name, the workloads always differ slightly for each particular .NET SDK.
39+
40+
<!-- UPDATE 10.0 - Surface new content
41+
42+
* Using the .NET 10 SDK
43+
* Targeting .NET 10 requires `wasm-tools`.
44+
* Targeting .NET 9 requires `wasm-tools-net9`.
45+
* Targeting .NET 8 requires `wasm-tools-net8`.
46+
47+
-->
48+
49+
* Using the .NET 9 SDK
50+
* Targeting .NET 9 requires `wasm-tools`.
51+
* Targeting .NET 8 requires `wasm-tools-net8`.
52+
* Using the .NET 8 SDK: Targeting .NET 8 requires `wasm-tools`.
3453

3554
## Ahead-of-time (AOT) compilation
3655

0 commit comments

Comments
 (0)