Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebToolsE2E]After installing SDK 10.0 Preview 1, wasm-tools can be displayed on dotnet workload list but it doesn't work #46684

Open
maitan11 opened this issue Feb 10, 2025 · 2 comments
Labels
Area-Workloads untriaged Request triage from a team member

Comments

@maitan11
Copy link

INSTALL STEPS:

  1. Clean machine: Win11 x64 ENU 24h2
  2. Install SDK .NET 9.0.200
  3. Apply Feed

REPRO STEPS​:

  1. Open cmd, then run dotnet workload install wasm-tools to install wasm-tools, and then open a new cmd and run: dotnet workload list

    Image

  2. create a 9.0 WASM app by cmd: dotnet new blazorwasm

  3. Change csproj file: <RunAOTCompilation>True</RunAOTCompilation>

  4. Build and run successfully

  5. Install SDK 10.0.100-preview.1.25103.13 and apply feed and open a ne cmd and run: dotnet workload list

    Image

  6. Create a 9.0 WASM app by cmd: dotnet new blazorwasm -f net9.0

  7. Change csproj file: <RunAOTCompilation>True</RunAOTCompilation>

ACTUAL:
Build the WASM project, it will meet an error:
Image
C:\Program Files\dotnet\sdk\10.0.100-preview.1.25103.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147:
To build this project, the following workloads must be installed: wasm-tools wasm-tools-net9
To install these workloads, run the following command: dotnet workload restore

NOTE:

  1. This issue can also repro in .NET 10 wasm project when check AOT option
    Image

EXPECTED:
wasm-tools workload should still be installed after installing 10.0 Preview 1 SDK

Dotnet info:
.NET SDK:
Version: 10.0.100-preview.1.25103.13
Commit: 9035d02
Workload version: 10.0.100-manifests.bf5105ba
MSBuild version: 17.14.0-preview-25073-02+291a81087

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.100-preview.1.25103.13\

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
Version: 10.0.0-preview.1.25080.5
Architecture: x64
Commit: b98cabca12

.NET SDKs installed:
9.0.200 [C:\Program Files\dotnet\sdk]
10.0.100-preview.1.25103.13 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-preview.1.25103.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-preview.1.25080.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.0-preview.1.25080.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Workloads untriaged Request triage from a team member labels Feb 10, 2025
@maitan11 maitan11 changed the title After installing SDK 10.0 Preview 1, wasm-tools can be displayed on dotnet workload list but it doesn't work [WebToolsE2E]After installing SDK 10.0 Preview 1, wasm-tools can be displayed on dotnet workload list but it doesn't work Feb 10, 2025
@marcpopMSFT
Copy link
Member

To clarify, are you running dotnet workload install/update after installing the 10 sdk? If not, it's been the case since workloads were created that workloads installed into the 9 SDK aren't recognized by later sdks that get installed.

@maitan11
Copy link
Author

I have installed wasm-tools with the command "dotnet workload install wasm-tools" before installing SDK 10.0, and it works fine. But after I install SDK 10.0, I can see that wasm-tools has been installed with the command "dotnet workload list", but it doesn't work,
After I manually installed wasm-tools again using the command "dotnet workload wasm-tools", .net10.0 project worked. For .net9.0 project, I need to run "dotnet workload install wasm-tools-net9". Is this expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Workloads untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants