Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] uno-check install _incorrect_ net 6 workloads #103

Open
pictos opened this issue Oct 13, 2022 · 3 comments
Open

[BUG] uno-check install _incorrect_ net 6 workloads #103

pictos opened this issue Oct 13, 2022 · 3 comments

Comments

@pictos
Copy link
Contributor

pictos commented Oct 13, 2022

I'm on a Windows 10 machine

So, I installed the workloads using the uno-check tool and when I run dotnet workload list I see this error

Unhandled exception: System.Collections.Generic.KeyNotFoundException: The given key 'Microsoft.Android.Sdk' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.<>c__DisplayClass30_0.<GetUpdatedWorkloads>b__2(WorkloadPackId p)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.GetUpdatedWorkloads(WorkloadResolver advertisingManifestResolver, IEnumerable`1 installedWorkloads)+MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   at Microsoft.DotNet.Workloads.Workload.List.WorkloadListCommand.Execute()
   at Microsoft.DotNet.Cli.WorkloadListCommandParser.<>c.<ConstructCommand>b__6_0(ParseResult parseResult)
   at Microsoft.DotNet.Cli.ParseResultCommandHandler.Invoke(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()

I uninstalled the android, ios, macos, and maccatalyst workloads and installed them again using the dotnet workload install for each one. After that, the error disappears.

Then I ran the uno-check again and complains that I don't have these workloads installed, if I let the tool install the workload the error reappears.

@jeromelaban
Copy link
Member

Can you try again with the latest preview of uno-check? Still, this is not something we can fix easily those are .NET SDK issues...

@pictos
Copy link
Contributor Author

pictos commented Oct 13, 2022

Sure @jeromelaban, how can I install the preview version? Didn't find any reference on the readme

@jeromelaban
Copy link
Member

You can use --version with dotnet tool install (or update) with the latest nuget dev package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants