!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

120 Members
24 Servers

Load older messages


SenderMessageTime
14 Aug 2025
@corngood:corngood.comCorngoodOh brutal :(21:41:23
@whovian9369:matrix.orgWhovian9369I'll see what I can easily recover from it and see how quickly I can spin back up21:41:43
@corngood:corngood.comCorngood src = ../..; seems strange to me. Why don't you set it to the root of each project? 21:44:20
@oatmealraisin:matrix.orgoatmealraisinBecause then I get issues during build saying the referenced projects don't exist22:12:39
@oatmealraisin:matrix.orgoatmealraisinIdk if I can replicate at this point, a lot has changed22:12:52
@corngood:corngood.comCorngoodWell in that case the projectFile would just be `API.csproj`, or you could probably just omit it.22:13:37
@oatmealraisin:matrix.orgoatmealraisinYes, but projectReferences would be missing, I don't have error logs but it would complain about the csproj files for project references being missing22:15:49
@oatmealraisin:matrix.orgoatmealraisinIt's very possible I was doing something else wrong, but now all the nix stuff is in a different directory22:20:04
@corngood:corngood.comCorngood

Yeah, you can't do it with ProjectReference. You need to use PackageReference. There are basically two ways to do what you're trying to do, and you're sort of in-between them:

  1. one nix derivation with an assortment of projects linked together with ProjectReference, one deps.json

  2. one nix derivation per nuget package with packNupkg = true, using PackageReference

22:24:38
@gggkiller:matrix.orgGGGby default it just copies all json files to publish output22:47:48
@gggkiller:matrix.orgGGG(I can't remember if it's ASP.NET Core specific or not)22:47:59
15 Aug 2025
@emma:rory.gayEmma [it/its]huh? i've never had aspnetcore do that12:55:48
@emma:rory.gayEmma [it/its]it sure doesnt copy appsettings.Local.json12:56:14
@emma:rory.gayEmma [it/its]* it sure doesnt copy appsettings.Local.json by default12:56:18
16 Aug 2025
@gggkiller:matrix.orgGGGyes, because the csproj has an exclusion for that iirc00:00:48
@emma:rory.gayEmma [it/its]It doesnt though?07:24:09
@emma:rory.gayEmma [it/its]Local was just an example, pick anything and it wont be copied07:24:57
18 Aug 2025
@oatmealraisin:matrix.orgoatmealraisinIt took me all weekend to read this correctly, haha. So the entire project has a solution file (and an slnf file for excluding tests). I was under the assumption I needed to build each one individually to get everything to work, that's not true?19:17:24
@gggkiller:matrix.orgGGGno19:17:46
@gggkiller:matrix.orgGGG you can just build the "entry" project (i.e. MyProject.CLI.csproj) and and ProjectReferences it has will be built along with it (and also included in deps.json 19:18:16
@gggkiller:matrix.orgGGG * you can just build the "entry" project (i.e. MyProject.CLI.csproj or MyProject.UI.csproj) and and ProjectReferences it has will be built along with it (and also included in deps.json 19:18:29
@oatmealraisin:matrix.orgoatmealraisinDang haha that's way easier, probably builds faster as well..19:19:35
@gggkiller:matrix.orgGGG * you can just build the "entry" project (i.e. MyProject.CLI.csproj or MyProject.UI.csproj) and and ProjectReferences it has will be built along with it (and also included in deps.json when you run passthru.fetch-deps) 19:22:38
19 Aug 2025
@whovian9369:matrix.orgWhovian9369 Corngood: Still need someone to test building dotnetCorePackages.dotnet_10.vmr? 16:34:23
@whovian9369:matrix.orgWhovian9369 I get to patchPhase at least, that's good. ... And then to configurePhase! 16:47:46
@whovian9369:matrix.orgWhovian9369 Got to buildPhase! 16:51:05
@corngood:corngood.comCorngoodThe crash we've been seeing was in configurePhase, so it looks like you're not hitting it. Thanks for testing though16:51:43
@whovian9369:matrix.orgWhovian9369Ah that's all then? Cool. I'll see how far I get in the build then!16:52:27
@whovian9369:matrix.orgWhovian9369
╭─whovian@nixos-wsl /tmp/wat/nix
╰─$  nix log /nix/store/9xi552907cas1y8rfwyifai5c7h92sjd-dotnet-vmr-10.0.0-preview.6.drv | rg -i "Phase com"
unpackPhase completed in 2 minutes 56 seconds
configurePhase completed in 59 seconds
buildPhase completed in 1 hours 50 minutes 18 seconds
installPhase completed in 43 seconds
fixupPhase completed in 2 minutes 50 seconds

So it took 2 hours but dotnetCorePackages.dotnet_10.vmr built! \o/

18:48:30
@whovian9369:matrix.orgWhovian9369Oh thank goodness, that build was the same derivation as what I needed to use for the package that I wanted to build with it anyway. Yay for not needing another 2 hour build!20:05:00

Show newer messages


Back to Room ListRoom Version: 9