!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

114 Members
23 Servers

Load older messages


SenderMessageTime
8 Aug 2025
@oatmealraisin:matrix.orgoatmealraisin No, I don't really know how passthru works. Right now I'm doing dotnet restore <csproj> --packages out; nuget-to-json out > deps.json 21:35:01
@oatmealraisin:matrix.orgoatmealraisin Actually, I just read up on it and I'm getting this error upon runnin result, mv: cannot create regular file '/nix/store/79w8gxjdfwahlzy79zxyzhsp0nrls06j-source/deps.nix': Permission denied 22:00:20
@corngood:corngood.comCorngoodYou can't run it through a flake. You'd have to do it in impure mode, so the output is writeable.23:31:46
9 Aug 2025
@oatmealraisin:matrix.orgoatmealraisin Ok, good to know. I'm running nix build .#default.passthru.fetch-deps; ./result, and passing --impure doesn't change anything. I'll try to make a non-flake build to make this deps.json file 00:38:20
@oatmealraisin:matrix.orgoatmealraisin Made a quick default.nix with the main buildDotnetModule, no more tools issues, thanks for the help! 00:46:50
@oatmealraisin:matrix.orgoatmealraisinWould it be worth it to add this info to the documentation?00:56:23
@oatmealraisin:matrix.orgoatmealraisinAlso, I'm not sure what happened, but a bunch of the WebAssembly related deps (for a blazor/razor part of the project) were a minor version off, I needed to manually change a bunch from 8.0.17 to 8.0.18. Any idea why this might have happened?01:01:53
@oatmealraisin:matrix.orgoatmealraisin Also, now I'm running into another issue wrt wasm, error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'browser-wasm'., I've seen some others having problems with this 01:05:52
@gggkiller:matrix.orgGGGyeah, you probably have to install the wasm workload and I don't think we support that currently01:22:50
@gggkiller:matrix.orgGGGunless if homedir workload installation got re-enabled recently01:23:09
@oatmealraisin:matrix.orgoatmealraisin I'm also getting this error intermittently, error MSB4018: System.IO.IOException: The process cannot access the file '/build/y0lpd34wqi3vwms9ci0i5yq4mq90sz23-source/src/Infrastructure/bin/Release/net8.0/Infrastructure.deps.json' because it is being used by another process. 01:24:11
@oatmealraisin:matrix.orgoatmealraisinNot sure what to make of that01:24:16
@oatmealraisin:matrix.orgoatmealraisinngl I do not know what this means01:24:30
@corngood:corngood.comCorngood
In reply to @oatmealraisin:matrix.org
I'm also getting this error intermittently, error MSB4018: System.IO.IOException: The process cannot access the file '/build/y0lpd34wqi3vwms9ci0i5yq4mq90sz23-source/src/Infrastructure/bin/Release/net8.0/Infrastructure.deps.json' because it is being used by another process.
I think that's usually if you're building a solution file with concurrency.
01:29:24
@oatmealraisin:matrix.orgoatmealraisinIs concurrency on by default?01:30:20
@corngood:corngood.comCorngoodYeah, unless `enableParallelBuilding = false`. There's documentation somewhere about why that's not safe in all cases, but I haven't found it yet...01:32:38
@oatmealraisin:matrix.orgoatmealraisinI must've glanced over it too fast, I thought it was off by default. I'll change that. I'm also not making derivations for every projectreference yet..01:34:36
@oatmealraisin:matrix.orgoatmealraisinHey! The whole thing just built01:35:15
@oatmealraisin:matrix.orgoatmealraisin It doesn't run because it needs selfContainedBuild but just getting to this point is great. Corngood thanks again for the help 01:59:20
@corngood:corngood.comCorngood
In reply to @oatmealraisin:matrix.org
I must've glanced over it too fast, I thought it was off by default. I'll change that. I'm also not making derivations for every projectreference yet..

stdenv is off by default, buildDotnetModule is on by default...

I think some other languages did the same because they don't have the legacy of stdenv.

The documentation I was talking about was the concurrent solution building problem, but that's an upstream dotnet thing.

02:04:20
@corngood:corngood.comCorngood

For some reason I can't find any reference now, but I seem to remember the problem was with solution files specifically causing the same project to be build twice concurrently when there's a diamond dependency. I think it had something to do with the target framework or runtime being used as well.

There are a bunch of packages that work around it. For example openutau:

  # [...]/Microsoft.NET.Sdk.targets(157,5): error MSB4018: The "GenerateDepsFile" task failed unexpectedly. [[...]/OpenUtau.Core.csproj]
  # [...]/Microsoft.NET.Sdk.targets(157,5): error MSB4018: System.IO.IOException: The process cannot access the file '[...]/OpenUtau.Core.deps.json' because it is being used by another process. [[...]/OpenUtau.Core.csproj]
  enableParallelBuilding = false;

  projectFile = "OpenUtau.sln";
02:19:29
13 Aug 2025
@whovian9369:matrix.orgWhovian9369

Hi, me again. Sorry
A friend is trying to use AoT with his app, and I can't figure out for the life of me how to have selfContained = false; (which he insists has to be false) and use the AoT at the same time due to the following. Any thoughts?

...
@nix { "action": "setPhase", "phase": "installPhase" }
Executing dotnetInstallHook
/build/nuget.yzA66y/fallback/microsoft.dotnet.ilcompiler/9.0.7/build/Microsoft.NETCore.Native.Publish.targets(56,5): error : PublishTrimmed is implied by native compilation and cannot be disabled. [/build/gx7q6dmvpva0fphxrx9dkj7yyyx1yl43-source/GrindCore.PerfTest.csproj]

Anyone have any suggestions on what to do next?

17:18:25
@emma:rory.gayEmma [it/its]i thought nativeaot and multi-file were mutually exclusive?17:19:34
@whovian9369:matrix.orgWhovian9369Can't say I kno17:19:56
@whovian9369:matrix.orgWhovian9369* Can't say I know17:19:58
@6pak:matrix.org6paknativeaot has to be self-contained, yeah17:20:22
@6pak:matrix.org6pakready2run is a form of aot, but that's not nativeaot17:20:55
@whovian9369:matrix.orgWhovian9369 My friend seems to think that AoT (I'm assuming nativeaot) can be enabled while selfContained = false; is set (seemingly to not need the runtime at all?), but the above error seems to claim otherwise. 17:29:43
@whovian9369:matrix.orgWhovian9369 Admittedly I'm not quite sure what I'm asking, since the build works fine with dotnetInstallFlags = [ "-p:PublishAot=false" ]; selfContainedBuild = false; but not with ... [ "-p:PublishAot=true" ]; selfContainedBuild = false; which is what my friend seems to want me to try. 17:32:47
@whovian9369:matrix.orgWhovian9369If they're mutually exclusive on the Dotnet side then that's completely fine, I will just have to make sure he's aware of that fact. 😅17:33:36

Show newer messages


Back to Room ListRoom Version: 9