Skip to content

'dotnet workload list' CLI command should not download and install workloads without a user permission #38026

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

Closed
devhls opened this issue Jan 16, 2024 · 1 comment
Assignees
Labels
Area-Workloads untriaged Request triage from a team member

Comments

@devhls
Copy link

devhls commented Jan 16, 2024

I guess there were problems with workloads after the upgrade to dotnet 8 and in order to fix it I used Redth.Net.Maui.Check utility and updated the visual studio using its installer which can cause that some workloads were missing.

Once I run the command: dotnet workload list and get this:
image

Actual behavior:
the command 'dotnet workload list' downloads and installs all missing workloads.

Expected behavior:
the command 'dotnet workload list' provides the list of workloads and marks missing or corrupted and the prompt to the user to fix listed problems with 'Yes\No' options.

@ghost ghost added Area-Workloads untriaged Request triage from a team member labels Jan 16, 2024
@Forgind
Copy link
Contributor

Forgind commented Jan 30, 2024

Interesting! So this doesn't actually have to do with dotnet workload list—in fact, if you'd run any other dotnet command, you would have gotten the same result. This has to do with our first run experience. If you haven't used dotnet before, we (by default) "ConfigureDotNetForFirstTimeUse", and that includes a WorkloadIntegrityChecker.RunFirstUseCheck. The latter looks at what workloads you have installed and tries to install them again before it starts the operation to make sure everything is in working order for your new version of dotnet.

I'll admit that can be surprising, and you can disable that behavior if you'd like by setting the environment variable DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK to 1.

This looks like an intentional change (issue #31872; PR #34322). I can't think of a reason off-hand that someone would want to update .NET and have non-functional workloads; was there a scenario you had in mind in which someone would be likely to reject the workload update we recommended?

@Forgind Forgind closed this as not planned Won't fix, can't repro, duplicate, stale Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Workloads untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants