dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.39k stars 10k forks source link

DotNet AOT publish broken after 'workload update microsoft-net-sdk-blazorwebassembly-aot' #34422

Closed MarkStega closed 3 years ago

MarkStega commented 3 years ago

Describe the bug

1) I updated my project to .Net Preview 6 2) All was working including publishing my wasm app 3) I referred back to the announcement blog and discovered that I missed the step of updating the aot workload 4) I did the update and could no longer publish the wasm app (Visual Studio errored saying that the workload 'microsoft-net-sdk-blazorwebassembly-aot' was required when it tried to build the wasm app).

C:\WINDOWS\system32>dotnet workload update

Updated advertising manifest microsoft.net.sdk.android.
Updated advertising manifest microsoft.net.sdk.ios.
Updated advertising manifest microsoft.net.sdk.maccatalyst.
Updated advertising manifest microsoft.net.sdk.macos.
Updated advertising manifest microsoft.net.sdk.maui.
Updated advertising manifest microsoft.net.sdk.tvos.
Updated advertising manifest microsoft.net.workload.mono.toolchain.
Installing pack Microsoft.NET.Runtime.Emscripten.Node version 6.0.0-preview.6.21275.1...
Writing workload pack installation record for Microsoft.NET.Runtime.Emscripten.Node version 6.0.0-preview.6.21275.1...
Installing pack Microsoft.NET.Runtime.Emscripten.Python version 6.0.0-preview.6.21275.1...
Writing workload pack installation record for Microsoft.NET.Runtime.Emscripten.Python version 6.0.0-preview.6.21275.1...
Installing pack Microsoft.NET.Runtime.Emscripten.Sdk version 6.0.0-preview.6.21275.1...
Writing workload pack installation record for Microsoft.NET.Runtime.Emscripten.Sdk version 6.0.0-preview.6.21275.1...
Garbage collecting for SDK feature bands 6.0.100...

Successfully updated workload(s): microsoft-net-sdk-blazorwebassembly-aot.

5) 'dotnet workload list' showed the presence of the optional workload 'microsoft-net-sdk-blazorwebassembly-aot' 6) Doing another repair did not help 7) I restored functionality by doing a 'workload uninstall' followed by a 'workload install' of the aot workload

To Reproduce

See above

Exceptions (if any)

Further technical details

C:\WINDOWS\system32>dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.6.21355.2
 Commit:    7f8e0d76c0

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19043
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100-preview.6.21355.2\

Host (useful for support):
  Version: 6.0.0-preview.6.21352.12
  Commit:  770d630b28

.NET SDKs installed:
  3.1.411 [C:\Program Files\dotnet\sdk]
  5.0.302 [C:\Program Files\dotnet\sdk]
  6.0.100-preview.6.21355.2 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-preview.6.21355.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-preview.6.21352.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0-preview.6.21353.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

C:\WINDOWS\system32>

Visual Studio 2022 Preview 2

pranavkm commented 3 years ago

Can you include the error that you receive when you publish in the current state?

ghost commented 3 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

See our Issue Management Policies for more information.

MarkStega commented 3 years ago

The error is called out in point #4 above