29 May 2025 |
Whovian9369 | Hey, I'm here again to cause issues. :P I'm trying to work with Nuke.Common to properly do part of a build, and fetch-deps is throwing MSBUILD : error MSB1009: Project file does not exist.
$ nix build -L .#default.passthru.fetch-deps -o fetch-deps
$ ./fetch-deps deps.json
fetching dependencies for test-2024.08.29
Running phase: unpackPhase
unpacking source archive /nix/store/xfrqd606lr502c3z0dm5y84ljzr1x5nr-source
source root is source
Running phase: patchPhase
Running phase: configureNuget
The template "NuGet Config" was created successfully.
Processing post-creation actions...
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
Determining projects to restore...
Restored /tmp/fetch-deps-test-2024.08.29.9gDEqK/source/build/_build.csproj (in 4.55 sec).
MSBUILD : error MSB1009: Project file does not exist.
Switch: dirs.proj
| 02:14:32 |
Whovian9369 | Does anyone happen to have any ideas? | 02:14:42 |
Whovian9369 | Oh maybe that's my fault for not fully fixing the for project in... section - Lemme see if I can fix it. | 02:16:44 |
Whovian9369 | Yep, silly me - That was it. | 02:17:23 |
Whovian9369 | Now I'm running into NETSDK1004 so that's definitely progress! | 02:38:00 |
Corngood | You might want to look at avalonia in nixpkgs. It's the only package using nuke that comes to mind. One of the things it does is:
configurePhase = ''
runHook preConfigure
for project in nukebuild/_build.csproj dirs.proj; do
for rid in $runtimeIds; do
dotnet restore --runtime "$rid" "$project"
done
done
runHook postConfigure
'';
| 11:59:28 |
Whovian9369 | Thanks for the suggestion! I already am looking at Avalonia and had originally copied runtimeIds and configurePhase without modification, which caused the initial MSB1009 issue that I was getting. Removing the project for loop fixed that, as I only have the one project file. Unfortunately for me, there's no listed fix for NETSDK1004 in the Avalonia package.nix | 13:11:47 |
Whovian9369 | * Thanks for the suggestion! I already am looking at Avalonia and had originally copied runtimeIds and configurePhase without modification, which caused the initial MSB1009 issue that I was getting. Removing the project for loop fixed that, as I only have the one project file. Unfortunately for me, there's no listed fix for NETSDK1004 in the Avalonia package.nix . | 13:11:59 |
Whovian9369 | (Or in all of Nixpkgs from what I can tell. I'm not terribly surprised at that, though I was a little hopeful.) | 13:18:44 |
Corngood | I think NETSDK1004 would usually be caused by restore/build not using the same args, or possibly a mismatch between restoring a project and a solution? | 13:34:01 |
Whovian9369 | It seems to be happening with the Nuke setup, so I'm a bit confused then - I'll get a log snippet in a moment as I forgot to last night. | 14:23:12 |
Whovian9369 | Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/xfrqd606lr502c3z0dm5y84ljzr1x5nr-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: configureNuget
@nix { "action": "setPhase", "phase": "configureNuget" }
The template "NuGet Config" was created successfully.
Processing post-creation actions...
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Determining projects to restore...
Restored /build/source/build/_build.csproj (in 2.08 sec).
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
Executing dotnetBuildHook
/nix/store/j23hyfpfhlibl3jrighz7pcblayjlcs7-dotnet-sdk-8.0.409/share/dotnet/sdk/8.0.409/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1004: Assets file '/build/source/src/hactoolnet/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/build/source/src/hactoolnet/hactoolnet.csproj]
Build FAILED.
/nix/store/j23hyfpfhlibl3jrighz7pcblayjlcs7-dotnet-sdk-8.0.409/share/dotnet/sdk/8.0.409/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1004: Assets file '/build/source/src/hactoolnet/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/build/source/src/hactoolnet/hactoolnet.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.63
Here's the failure log.
| 14:25:06 |
Whovian9369 | Oh wait that is in buildPhase which would be what I'm actually trying to build, I somehow missed that. | 14:27:16 |
Corngood | It looks like `hactoolnet.csproj` hasn't been restored. Can you share the expression source? | 15:54:31 |
Whovian9369 | One slight issue is that Upstream no longer exists, so I wish you luck finding a copy. | 15:56:14 |
Whovian9369 | Download package.nix | 15:56:20 |
Whovian9369 | Download deps.json | 15:56:20 |
Whovian9369 | I should have sent package.nix as a code block, and don't know why I didn't. 😅 Sorry about that! | 15:57:21 |
Whovian9369 | So it seems that Nix/dotnet really doesn't like it if you run runHook preConfigure in preConfigure . Oops. It's no longer segfaulting! 🎉 | 21:49:08 |
Whovian9369 | I never mentioned the issue in here, sorry about that. 😅
fetch-deps was segfaulting for some reason, and it looks like I fixed it when I removed the accidentally remaining runHook s. | 21:54:47 |
1 Jun 2025 |
| Sean Thawe joined the room. | 23:47:40 |
4 Jun 2025 |
purepani | Hey, I was wondering if there were any dotnet 4.8 runtime package definitions lying around.
My work currently uses that runtime, and I wasn't able to find the runtime throughout any of the nixpkgs history: https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=dotnet-sdk | 19:50:17 |
purepani | and the second I sent that I figured out the answer, being that dotnet 4.8 only works on windows | 19:51:30 |
6pak | yup, mono might work though | 19:52:31 |
5 Jun 2025 |
| @vengmark2:matrix.org left the room. | 15:55:38 |
7 Jun 2025 |
| @deeok:matrix.org changed their display name from deeok to matrixrooms.info mod bot (does NOT read/send messages and/or invites; used for checking reported rooms). | 22:44:35 |
| @deeok:matrix.org left the room. | 23:56:18 |
9 Jun 2025 |
| SigmaSquadron joined the room. | 13:05:24 |
Whovian9369 | I ran into this again - Why do so many people have paths in their repo with spaces in it?! 😅
Guess I'm asking again, any tips? | 20:43:00 |
Corngood | In reply to @whovian9369:matrix.org I ran into this again - Why do so many people have paths in their repo with spaces in it?! 😅 Guess I'm asking again, any tips? Did you mean to link to something? I guess you're talking about nuget-to-json working in paths with spaces? | 21:23:52 |