question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgraded to .net 6 Preview 7 and workload commands are failing

See original GitHub issue

Describe the bug

I upgraded to VS2022 Preview 3 and attempted to follow the instructions for removing the old aot workload and received this failure:

C:\WINDOWS\system32>dotnet workload uninstall microsoft-net-sdk-blazorwebassembly-aot

Removing workload installation record for microsoft-net-sdk-blazorwebassembly-aot...
Garbage collecting for SDK feature bands ...
Workload uninstallation failed: The JSON value could not be converted to Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadPackId. Path: $.Id | LineNumber: 0 | BytePositionInLine: 45.
uninstall
  Uninstall a workload.

Usage:
  dotnet [options] workload uninstall [<WORKLOAD_ID>...]

Arguments:
  <WORKLOAD_ID>  The NuGet Package Id of the workload to install.

Options:
  -?, -h, --help  Show help and usage information

I think this occurred because after a failed VS2022 installation yesterday I completely removed VS2022 and the entire preview6 & preview7 runtimes. So presumably the installed aot workload did not exist. So I believe that this is just a bad error message.

However, when I attempted to install the wasm-tools workload I got

C:\WINDOWS\system32>dotnet workload install wasm-tools

Updated advertising manifest microsoft.net.sdk.tvos.
Updated advertising manifest microsoft.net.sdk.android.
Updated advertising manifest microsoft.net.sdk.maui.
Updated advertising manifest microsoft.net.sdk.maccatalyst.
Updated advertising manifest microsoft.net.sdk.macos.
Updated advertising manifest microsoft.net.sdk.ios.
Updated advertising manifest microsoft.net.workload.mono.toolchain.
Updated advertising manifest microsoft.net.workload.emscripten.
Installing workload manifest microsoft.net.sdk.android version 30.0.100-preview.7.110.
Installing workload manifest microsoft.net.sdk.maui version 6.0.100-preview.7.1345.
Installing pack Microsoft.NET.Runtime.WebAssembly.Sdk version 6.0.0-preview.7.21377.19...
Writing workload pack installation record for Microsoft.NET.Runtime.WebAssembly.Sdk version 6.0.0-preview.7.21377.19...
Installing pack Microsoft.NETCore.App.Runtime.Mono.browser-wasm version 6.0.0-preview.7.21377.19...
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.Mono.browser-wasm version 6.0.0-preview.7.21377.19...
Installing pack Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm version 6.0.0-preview.7.21377.19...
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm version 6.0.0-preview.7.21377.19...
Installing pack Microsoft.NET.Runtime.MonoAOTCompiler.Task version 6.0.0-preview.7.21377.19...
Writing workload pack installation record for Microsoft.NET.Runtime.MonoAOTCompiler.Task version 6.0.0-preview.7.21377.19...
Installing pack Microsoft.NET.Runtime.MonoTargets.Sdk version 6.0.0-preview.7.21377.19...
Writing workload pack installation record for Microsoft.NET.Runtime.MonoTargets.Sdk version 6.0.0-preview.7.21377.19...
Installing pack Microsoft.NET.Runtime.Emscripten.Node version 6.0.0-preview.7.21377.2...
Writing workload pack installation record for Microsoft.NET.Runtime.Emscripten.Node version 6.0.0-preview.7.21377.2...
Installing pack Microsoft.NET.Runtime.Emscripten.Python version 6.0.0-preview.7.21377.2...
Writing workload pack installation record for Microsoft.NET.Runtime.Emscripten.Python version 6.0.0-preview.7.21377.2...
Installing pack Microsoft.NET.Runtime.Emscripten.Sdk version 6.0.0-preview.7.21377.2...
Workload installation failed, rolling back installed packs...
Installing workload manifest microsoft.net.sdk.android version 30.0.100-preview.7.93.
Installation roll back failed: Failed to install manifest microsoft.net.sdk.android version 30.0.100-preview.7.93: microsoft.net.sdk.android.manifest-6.0.100::30.0.100-preview.7.93 is not found in NuGet feeds C:\Solutions\Local NuGet Packages;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\;https://api.nuget.org/v3/index.json"..
Rolling back pack Microsoft.NET.Runtime.WebAssembly.Sdk installation...
Uninstalling workload pack Microsoft.NET.Runtime.WebAssembly.Sdk version 6.0.0-preview.7.21377.19.
Rolling back pack Microsoft.NETCore.App.Runtime.Mono.browser-wasm installation...
Uninstalling workload pack Microsoft.NETCore.App.Runtime.Mono.browser-wasm version 6.0.0-preview.7.21377.19.
Rolling back pack Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm installation...
Uninstalling workload pack Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm version 6.0.0-preview.7.21377.19.
Rolling back pack Microsoft.NET.Runtime.MonoAOTCompiler.Task installation...
Uninstalling workload pack Microsoft.NET.Runtime.MonoAOTCompiler.Task version 6.0.0-preview.7.21377.19.
Rolling back pack Microsoft.NET.Runtime.MonoTargets.Sdk installation...
Uninstalling workload pack Microsoft.NET.Runtime.MonoTargets.Sdk version 6.0.0-preview.7.21377.19.
Rolling back pack Microsoft.NET.Runtime.Emscripten.Node installation...
Uninstalling workload pack Microsoft.NET.Runtime.Emscripten.Node version 6.0.0-preview.7.21377.2.
Rolling back pack Microsoft.NET.Runtime.Emscripten.Python installation...
Uninstalling workload pack Microsoft.NET.Runtime.Emscripten.Python version 6.0.0-preview.7.21377.2.
Writing workload pack installation record for Microsoft.NET.Runtime.Emscripten.Sdk version 6.0.0-preview.7.21377.2...
Workload installation failed: The transaction has aborted.
install

So it looks like there is a missing nuget package

To Reproduce

See problem description

Exceptions (if any)

Further technical details

VS2022 Preview 3

C:\WINDOWS\system32>dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.7.21379.14
 Commit:    22d70b47bc

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.7.21379.14\

Host (useful for support):
  Version: 6.0.0-preview.7.21377.19
  Commit:  91ba01788d

.NET SDKs installed:
  3.1.412 [C:\Program Files\dotnet\sdk]
  5.0.303 [C:\Program Files\dotnet\sdk]
  6.0.100-preview.7.21379.14 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-preview.7.21378.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-preview.7.21377.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0-preview.7.21378.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

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


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
wilzonejoecommented, Aug 11, 2021

I found a solution which is working for me.

Steps

  1. Delete C:\Program Files\dotnet\metadata\workloads folder
  2. Go to CMD (Admin)
  3. run “dotnet workload install maui”
1reaction
coatsycommented, Aug 23, 2021

Seeing what’s probably a similar issue upgrading from Preview 6 to Preview 7

> dotnet new console -o testenv
Workload pack 'Microsoft.NET.Runtime.Emscripten.Node' in manifest 'microsoft.net.workload.mono.toolchain' [C:\Program Files\dotnet\sdk-manifests\6.0.100\microsoft.net.workload.mono.toolchain\WorkloadManifest.json] conflicts with manifest 'microsoft.net.workload.emscripten' [C:\Program Files\dotnet\sdk-manifests\6.0.100\microsoft.net.workload.emscripten\WorkloadManifest.json]
   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.ComposeWorkloadManifests() in Microsoft.DotNet.TemplateLocator.dll:token 0x6000091+0x2be
   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion) in Microsoft.DotNet.TemplateLocator.dll:token 0x600008b+0x8a
   at Microsoft.DotNet.TemplateLocator.TemplateLocator.GetDotnetSdkTemplatePackages(String sdkVersion, String dotnetRootPath) in Microsoft.DotNet.TemplateLocator.dll:token 0x60000c9+0x4d
   at Microsoft.DotNet.Tools.New.OptionalWorkloadProvider.GetAllTemplatePackagesAsync(CancellationToken cancellationToken) in dotnet.dll:token 0x6000466+0x3a
   at Microsoft.TemplateEngine.Edge.Settings.TemplatePackageManager.<>c__DisplayClass21_0.<EnsureProvidersLoaded>b__2() in Microsoft.TemplateEngine.Edge.dll:token 0x60002e0+0x0
   at System.Threading.Tasks.Task`1.InnerInvoke() in System.Private.CoreLib.dll:token 0x600317f+0xf
   at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object obj) in System.Private.CoreLib.dll:token 0x6003320+0x0
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in System.Private.CoreLib.dll:token 0x6002eb0+0x15
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in System.Private.CoreLib.dll:token 0x6002eb0+0x46
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in System.Private.CoreLib.dll:token 0x600327a+0xa5
--- End of stack trace from previous location ---
Read more comments on GitHub >

github_iconTop Results From Across the Web

NETSDK1045: The current .NET SDK does not support ...
Go to Tools > Options > Environment > Preview Features, and make sure that Use previews of the .NET Core SDK is checked....
Read more >
SDK Resolver Failure - Net 7 - Net 6
NET 7 preview development to support things like multitargeting, and when you download the new RTM old preview files interfere can with it....
Read more >
Troubleshoot known issues - .NET MAUI
Learn about .NET MAUI known issues and troubleshooting you can do to resolve these issues.
Read more >
Cannot debug net6.0-macos Apps - Developer Community
When I hit debug, the following error is shown in the Terminal: Possible reasons for this include: * You misspelled a built-in dotnet...
Read more >
.NET 6 in a Nutshell — 7 Reasons Why It's Worth the ...
NET 6 supports HTTP/3 for improved performance. ... 7. SDK workloads. SDK workloads were first introduced in preview 4 of .NET 6.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found