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.

dotnet workload command should include elevation

See original GitHub issue

The 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:open
  • Created 2 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
sfoslundcommented, Jul 6, 2021

Please make sure that --print-download-link-only args don’t require elevation.

Good catch, I’ll put out a fix for this and track the issue here: https://github.com/dotnet/sdk/issues/18738

0reactions
datvmcommented, Apr 27, 2023

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:

image

I also notice that dotnet command keeps printing the telemetry note (usually it only does once).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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