-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
.NET workloads fail to install #226107
Comments
A mapping of .NET workload to NuGet packages required is here: |
Related: #181636 |
@mdarocha thanks! @Smaug123 it looks like you had more success with dotnet workloads in https://github.com/Smaug123/nix-maui. Would you be interested in upstreaming your work to nixpkgs? |
I'm afraid this isn't something I'd be happy to maintain - it mostly works but is definitely suboptimal and would probably be a decent amount of work to upstream. |
If I'll find the time, I'll attempt to expand on @Smaug123's work |
Since the dotnet workload installer now supports installing to a user directory, could it be possible to simply relocate the dotnet-sdk nixpkg to user space? |
A possible spanner in the works: PublishAot pulls down some binaries from NuGet, and therefore fails out of the box on NixOS because the AOT compiler can't find the linker (or something like that, it's been a while). So there's always going to have to be some amount of Nix wrangling somewhere. |
This makes me so very sad, I only recently started using NixOS and I am a .NET developer by trade, I want to daily drive this so badly :( |
even if workloads are installed in user space they are still failing to build dotnet/sdk#37706 |
does no solution to this exist? |
Copied from: #325667 Describe the bugIt is currently impossible to install .NET workloads on NixOS: ❯ dotnet workload install maui
Unhandled exception: System.IO.IOException: Read-only file system : '/nix/store/as1j1inzdjdaca6gdcfdr2bdsppgr3px-dotnet-sdk-8.0.300/metadata'
at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
at System.IO.Directory.CreateDirectory(String path)
at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallerFactory.CanWriteToDotnetRoot(String dotnetDir)
at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallerFactory.GetWorkloadInstaller(IReporter reporter, SdkFeatureBand sdkFeatureBand, IWorkloadResolver workloadResolver, VerbosityOptions verbosity, String userProfileDir, Boolean verifySignatures, INuGetPackageDownloader nugetPackageDownloader, String dotnetDir, String tempDirPath, PackageSourceLocation packageSourceLocation, RestoreActionConfig restoreActionConfig, Boolean elevationRequired, Boolean shouldLog)
at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand..ctor(ParseResult parseResult, IReporter reporter, IWorkloadResolverFactory workloadResolverFactory, IInstaller workloadInstaller, INuGetPackageDownloader nugetPackageDownloader, IWorkloadManifestUpdater workloadManifestUpdater, String tempDirPath, IReadOnlyCollection`1 workloadIds)
at Microsoft.DotNet.Cli.WorkloadInstallCommandParser.<>c.<ConstructCommand>b__6_0(ParseResult parseResult)
at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient) Steps To ReproduceSteps to reproduce the behavior:
Expected behavior
Additional contextAccording to dotnet/sdk#18823 this can be fixed by writing a file Notify maintainersMetadata❯ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.9.7, NixOS, 24.05 (Uakari), 24.05.20240702.706eef5`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.4`
- channels(root): `"nixos"`
- nixpkgs: `/nix/store/0z4i8wyg3ymm7kkb1gk2wyh08x230c6z-source` Add a 👍 reaction to issues you find important. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
@EmVee381 have you found a workaround? Could you please share? Safely I never got it to work on my nixos machine |
i use devenv, but you can use it similar way is it clear? it is just copy pasted from from your link :) it works for me very well, you just define overrieded package in between "let" block then use it as package in your derivation or shell.nix or anything and set environment variable DOTNET_ROOT
|
Describe the bug
Since .NET 5.0, .NET has shipped as a 'slim' SDK with support for optional workloads1. Optional workloads are expected to be installed by the user.
Steps To Reproduce
Steps to reproduce the behavior:
nix-shell -p dotnet-sdk_6
dotnet workload install android
Error
Expected behavior
Workloads to be enabled using nix configuration
Screenshots
N/A
Additional context
With the following .NET SDKs installed
The following workloads are available
Notify maintainers
@kuznero @mdarocha
Metadata
Footnotes
https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workloads.md ↩
The text was updated successfully, but these errors were encountered: