dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.7k stars 1.06k forks source link

missing dependency Microsoft.NET.Workload.Emscripten #20683

Closed masoodafar-web closed 3 years ago

masoodafar-web commented 3 years ago

Hi ,I using ASP.NET Core .NET 6 Preview 5 And I want to try to install microsoft-net-sdk-blazorwebassembly-aot Of course, I installed it successfully in version .NET 6 Preview 4 And I got this error:

System.Exception: Inconsistency in workload manifest 'microsoft.net.workload.mono.toolchain': missing dependency 'Microsoft.NET.Workload.Emscripten'
   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.RefreshWorkloadManifests() in Microsoft.DotNet.TemplateLocator.dll:token 0x6000065+0x17c
   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver..ctor(IWorkloadManifestProvider manifestProvider, String[] dotnetRootPaths, String[] currentRuntimeIdentifiers) in Microsoft.DotNet.TemplateLocator.dll:token 0x6000064+0x31
   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion) in Microsoft.DotNet.TemplateLocator.dll:token 0x6000062+0x8a
   at Microsoft.DotNet.Workloads.Workload.List.WorkloadListCommand..ctor(ParseResult result, IReporter reporter, IWorkloadInstallationRecordRepository workloadRecordRepo, String version) in dotnet.dll:token 0x6000189+0x62
   at Microsoft.DotNet.Workloads.Workload.WorkloadCommand.<get_SubCommands>b__9_3(ParseResult appliedOption) in dotnet.dll:token 0x600014b+0x0
   at Microsoft.DotNet.Cli.DotNetTopLevelCommandBase.RunCommand(String[] args) in dotnet.dll:token 0x60008ca+0x44
   at Microsoft.DotNet.Workloads.Workload.WorkloadCommand.Run(String[] args) in dotnet.dll:token 0x6000146+0x6
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient) in dotnet.dll:token 0x6000933+0x2e8
   at Microsoft.DotNet.Cli.Program.Main(String[] args) in dotnet.dll:token 0x6000931+0x6f
marcpopMSFT commented 3 years ago

Can you delete preview 4 (and all sdk-manifests) and use preview 7 or newer? There was incompatibility between preview 4 and preview 5 in the workloads.

AdmiralSnyder commented 2 years ago

@marcpopMSFT hey, does this problem affect the project loading of roslyn analyzer .csproj in VS2019, too, by any chance? i have this error:

Inconsistency in workload manifest 'microsoft.net.workload.mono.toolchain': missing dependency 'Microsoft.NET.Workload.Emscripten' --> just wanted to ask before creating another issue...

marcpopMSFT commented 2 years ago

t affects loading the SDK itself so could affect any 6.0 SDK install. If you're still hitting it, try a VS repair as you shouldn't' be able to get into this state anymore without a bad install.

AdmiralSnyder commented 2 years ago

hey and thanks @marcpopMSFT , in the meantime, i created an issue: #23596 --> do you mean repairing VS2019 or 2022?