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
dotnet workload
always installs maui workload as root. This is making it impossible to build a project as a regular user on Manjaro/Arch Linux
#40692
Comments
Interesting...I tried this out with 8.0.100 on ubuntu, and it didn't seem to repro even when I switched to a new user after installing a workload. I'm curious what the differences are between ubuntu and monjaro or if we have a regression between 100 and 204 |
What I am using, in case of manjaro, is the AUR package for dotnet sdk. This package to be specific: https://aur.archlinux.org/packages/dotnet-sdk-bin. Could it be possible that the PKGBUILD is to blame? |
I downloaded the 8.0.204 package for x64 from that link, extracted the contents, and copied them into my dotnet folder. I ran dotnet workload list (empty as expected), then install maui-android (failed: need admin rights), then sudo dotnet workload install maui-android (succeeded). Then I ran dotnet workload list again (without sudo), and it showed maui-android as installed. It's possible there's something special with the manjaro file system where it fakes a path at some point or prevents non-admin processes from accessing things in protected directories? |
@Forgind thank you for investigating into this. I managed to find the reason why it is not working. It seems that manjaro (and arch linux does this as well), have given incorrect permissions to the folders The solution for the future might lie in contacting the person maintaining the AUR package, that the PKGBUILD should create those two directories, and assign execution privileges for the folder. This is a little dangerous, so there probably exists a much better solution to this. Probably using groups, idk for now. Should we close the issue here? |
Thanks for your help with the investigation! I asked my PM where we should go from here, and he suggested transferring this issue to another dotnet repo that is a more central location for issues related to building dotnet from source, as in this case. They should be able to help us find the optimal solution here. |
This issue was moved to dotnet/source-build#4397 |
Looking at the packages at https://aur.archlinux.org/packages/dotnet-sdk-bin, the source is the Microsoft produced tarballs https://download.visualstudio.microsoft.com/download/pr/0a1b3cbd-b4af-4d0d-9ed7-0054f0e200b4/4bcc533c66379caaa91770236667aacb/dotnet-sdk-8.0.204-linux-x64.tar.gz @Forgind, this should be investigated on the SDK side to ensure the correct permissions in the Microsoft tarballs first. Because the AUR packages are based on the Microsoft tarballs, this is not a source-build issue. |
Hi, recently I installed am trying to build a Maui app, and it seems all my projects when I either use VSCode, Rider or even
dotnet build
as a regular user, fail with this error:/usr/share/dotnet/sdk/8.0.204/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: maui-android
Running
dotnet workload list
, gives me this output:But running the same command as sudo I can see that I have all the workloads installed:
What could be causing this? Could it be some odd permission problem I might have stumbled on?
More info:
I am using Manjaro Linux using dotnet version 8.0.204. The SDK, runtime and targeting tools are from the AUR.
The text was updated successfully, but these errors were encountered: