dotnet workload command should include elevation
See original GitHub issueThe error message for requiring a workload install shows a command line that will result in another error on macOS:
~/Projects/maui-workload-test: dotnet build test.csproj
Microsoft (R) Build Engine version 17.0.0-preview-21323-02+67ba2dfd7 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
/usr/local/share/dotnet/sdk/6.0.100-preview.7.21326.2/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(33,5): error NETSDK1147: To build this project, the following workloads must be installed: microsoft-android-sdk-full maui-core microsoft-net-runtime-mono-tooling [~/Projects/maui-workload-test/test.csproj]
/usr/local/share/dotnet/sdk/6.0.100-preview.7.21326.2/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(33,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload install microsoft-android-sdk-full maui-core microsoft-net-runtime-mono-tooling [~/Projects/maui-workload-test/test.csproj]
~/Projects/maui-workload-test: dotnet workload install microsoft-android-sdk-full
Inadequate permissions to access, please elevate to run this command.
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Elevated access for dotnet commands - .NET CLI
In particular, we don't recommend elevation with commands that use MSBuild, such as dotnet restore, dotnet build, and dotnet run. The primary ...
Read more >dotnet workload install command - .NET CLI
The dotnet workload install command installs one or more optional workloads. Optional workloads can be installed on top of the .NET SDK to...
Read more >dotnet workload command - .NET CLI
Prints out detailed information about installed workloads, including their installation source, manifest version, manifest path, and install ...
Read more >Command-line parameter examples for installation - Visual ...
Use --config to add workloads and components to an existing installation. This example uses the installer already installed on the client ...
Read more >Layouts - .NET MAUI
LayoutBounds attached property is used to specify the horizontal position, vertical position, width and height of an element. In addition, the ...
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
Good catch, I’ll put out a fix for this and track the issue here: https://github.com/dotnet/sdk/issues/18738
After the most recent MacOS/VS update, I cannot update or install workloads. The same message shows up even though I am running it with elevated (admin) permission:
I also notice that
dotnet
command keeps printing the telemetry note (usually it only does once).