Upgraded to .net 6 Preview 7 and workload commands are failing
See original GitHub issueDescribe 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:
- Created 2 years ago
- Reactions:1
- Comments:12 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found a solution which is working for me.
Steps
Seeing what’s probably a similar issue upgrading from Preview 6 to Preview 7