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.

Cannot load or run lots of my projects in my solution after installing .NET 7

See original GitHub issue

Edit + General Resolution (from @nagilson):

This is now documented as a known issue for .NET 7 and a resolution is provided here.

Describe the bug

I just installed the last update of visual studio. Then, this happened, I cannot open my projects. image C:\Users\PC2\source\repos\AktifPOS\AktifBarkod.AktifPOS.Data\AktifBarkod.AktifPOS.Data.csproj : error : SDK Resolver Failure: “The SDK resolver “Microsoft.DotNet.MSBuildSdkResolver” failed while attempting to resolve the SDK “Microsoft.NET.Sdk”. Exception: “Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestCompositionException: Workload definition ‘wasm-tools’ in manifest ‘microsoft.net.workload.mono.toolchain’ [C:\Program Files\dotnet\sdk-manifests\7.0.100\microsoft.net.workload.mono.toolchain\WorkloadManifest.json] conflicts with manifest ‘microsoft.net.workload.mono.toolchain.net7’ [C:\Program Files\dotnet\sdk-manifests\7.0.100\microsoft.net.workload.mono.toolchain.net7\WorkloadManifest.json] at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.ComposeWorkloadManifests() at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir) at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir) at Microsoft.DotNet.MSBuildSdkResolver.DotNetMSBuildSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext context, SdkResultFactory factory) at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.TryResolveSdkUsingSpecifiedResolvers(IList`1 resolvers, Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio, SdkResult& sdkResult)”” C:\Users\PC2\source\repos\AktifPOS\AktifBarkod.AktifPOS.Data\AktifBarkod.AktifPOS.Data.csproj

image

To Reproduce

Exceptions (if any)

Further technical details

  • PS C:\Users\PC2> dotnet --info .NET SDK: Version: 7.0.100 Commit: e12b7af219

Runtime Environment: OS Name: Windows OS Version: 10.0.22621 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.100\

Host: Version: 7.0.0 Architecture: x64 Commit: d099f075e4

.NET SDKs installed: 3.1.424 [C:\Program Files\dotnet\sdk] 5.0.301 [C:\Program Files\dotnet\sdk] 5.0.414 [C:\Program Files\dotnet\sdk] 6.0.100-rc.1.21463.6 [C:\Program Files\dotnet\sdk] 6.0.200 [C:\Program Files\dotnet\sdk] 7.0.100-rc.2.22477.23 [C:\Program Files\dotnet\sdk] 7.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.31 [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.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-rc.1.21452.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.0-rc.2.22476.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.31 [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.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21451.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0-rc.2.22472.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.31 [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.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.0-rc.1.21451.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.0-rc.2.22472.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found: arm64 [C:\Program Files\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\arm64\InstallLocation] 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 PS C:\Users\PC2>

  • VS 2019, VS 2022, VS 2022 Preview

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:22
  • Comments:37 (8 by maintainers)

github_iconTop GitHub Comments

7reactions
nagilsoncommented, Nov 9, 2022

Sorry you’re dealing with this; it sucks to get an update and then suddenly have your things break.

The official guidance we have for you atm is to uninstall any preview SDKs, like @xt0rted mentioned. Some workload files in some of the preview SDKs will conflict with the RTM / official .NET 7 SDK release. @pascallapradebrite4’s suggestion to delete the microsoft.net.workload.mono.toolchain is also valid and we have been telling people internally to do the same.

As for why, I believe In the middle of preview development some workload content got renamed, with .net7.0 being appended to the end. The reason this happened (multi targeting) is convoluted to say the least and someone else from the team could probably explain it better. We’ve been having discussions about how to prevent the same thing happening when folks upgrade to .NET 8. We are also considering dotnet workload clean which could fix this for you. Thanks, and please let us know of any other feedback or questions here!

7reactions
xt0rtedcommented, Nov 8, 2022

Just realized there was still a preview version of the sdk installed. I assumed this would be cleaned up when updating since I never manually installed this, but I guess it wasn’t. After updating I did restart like it suggested so it’s not due to a cleanup task not running yet.

I manually uninstalled 7.0.100-preview.6.22352.1 and that removes microsoft.net.workload.emscripten and microsoft.net.workload.mono.toolchain from C:\Program Files\dotnet\sdk-manifests\7.0.100 which fixed the issue for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SDK Resolver Failure - Net 7 - Net 6
My solution was to uninstall the stable version of . NET 7 (not the version from VS 2022), then install and uninstall 7.0....
Read more >
Visual Studio 2022 Community Project not load solution
Open Developer Command Prompt for VS 2022 Community > type and run devenv /ResetSettings . Right-click VS 2022 and run it as administrator....
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 >
Solution to Visual Studio 2022 messing up ...
NET 5 and .NET Standard 2 projects couldn't be loaded anymore in Visual Studio 2019. The error shown when attempting to load the...
Read more >
Support for the Upcoming .NET SDK 6.0
NET Core SDK for Solution' dialog box is shown: I changed the SDK version to 5.0, like this, and clicked OK: I then...
Read more >

github_iconTop Related Medium Post

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