!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

122 Members
23 Servers

Load older messages


SenderMessageTime
18 Aug 2025
@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
@whovian9369:matrix.orgWhovian9369

Oh no, it's not.

$  PAGER= nix log /nix/store/hipsbwjbxwlw20sjpmsfgkz0s7ja90fn-Aaru-6.0.0.drv
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/1xzm3a5wx770b9wcn1ffl6hqy7v7la1i-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: configureNuget
@nix { "action": "setPhase", "phase": "configureNuget" }
The command could not be loaded, possibly because:
  * You intended to execute a .NET application:
      The application 'new' does not exist or is not a managed .dll or .exe.
  * You intended to execute a .NET SDK command:
      A compatible .NET SDK was not found.

Requested SDK version: 10.0.100-preview.7
global.json file: /build/source/global.json

Installed SDKs:
10.0.100-preview.6.25358.103 [/nix/store/k0z0ayma9s53pmplr9770zid9z9c0x9y-dotnet-sdk-10.0.100-preview.6.25358.103/share/dotnet/sdk]

Install the [10.0.100-preview.7] .NET SDK or update [/build/source/global.json] to match an installed SDK.

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found

I can probably just remove the global.json and it'll likely work fine, but that still isn't fun.

20:06:50
@corngood:corngood.comCorngoodYou can modify global.json to allow patch level roll-forward. See `roslyn-ls`20:59:54
@whovian9369:matrix.orgWhovian9369

In this case it would be a fall back, but thank ya. It's something that I'll check later.

$ cat global.json

{
  "sdk": {
    "version": "10.0.100-preview.7",
    "rollForward": "latestFeature",
    "allowPrerelease": true
  }
}
21:59:26
@whovian9369:matrix.orgWhovian9369 Oh wow I didn't know about that jq feature - That's very nice! 22:12:43
@whovian9369:matrix.orgWhovian9369 * Oh wow I didn't know about that jq feature used via roslyn-ls (In this case jq '.sdk.rollForward = "latestMinor"' < global.json) - That's very nice! 22:15:30
@corngood:corngood.comCorngoodOh I misunderstood that you were going forward a version... Preview 7 is currently in a PR. Just having a few lingering problems with it.23:34:06
@whovian9369:matrix.orgWhovian9369Ah good23:35:55
@whovian9369:matrix.orgWhovian9369That'll help, especially if Hydra caches it this time.23:37:30
20 Aug 2025
@tris203:matrix.orgtris203 joined the room.20:03:13
21 Aug 2025
@whovian9369:matrix.orgWhovian9369 Hey just to check, is there a recommended way to add a Nuget repo to get Nugets from during a build?
Alternatively, is there a good way to build some Nugets from the same repo as the project I'm trying to build, provide them for fetch-deps, and use them for the build? I would just use a different Flake output, but I'm not sure if that's a "recommended" way to do that kind of thing.
06:45:46
@whovian9369:matrix.orgWhovian9369 Some context: I'm wanting to build https://github.com/FanTranslatorsInternational/Kuriimu2 (/src/ui/Kuriimu2.ImGui/Kuriimu2.ImGui.csproj) but fetch-deps is erroring on some dependencies from the repo itself: Kaligraphy, Kanvas, Kompression, and Komponent. 06:47:23
@whovian9369:matrix.orgWhovian9369 Huh, now I seem to be getting a successful fetch-deps for the extra dependencies, but nix build -L .#kanvas seems to be running into... error CS0246: The type or namespace name 'Komponent' could not be found (are you missing a using directive or an assembly reference?) 07:46:53
@emma:rory.gayEmma [it/its]doesnt nuget2nix include custom repos from nuget.config?09:24:56
@corngood:corngood.comCorngoodYeah, `fetch-deps` should just work. You wouldn't usually get CS0246 from a missing nuget dependency.10:40:58
@whovian9369:matrix.orgWhovian9369Well I don't have the repo added yet, but good to know, thanks.13:29:12
@whovian9369:matrix.orgWhovian9369

Sorry, those are basically two different errors.

The original error was NU1101 ("error NU1101: Unable to find package NAME. No packages exist with this id in source(s): nuget, _nix") for Kaligraphy, Kanvas, Kompression, and Komponent.

CS0246 is from me trying to self-package Komponent, Kaligraphy, and Kanvas to provide the derivation.
(k2Repo in the following is just me trying to set the used src once in flake.nix and passing it to the derivations that way so I don't have to update the used commit info more than once)

{
  packages.x86_64-linux = {
    default = pkgs.callPackage ./package.nix { inherit k2Repo; komponent = self.packages.${system}.komponent; kaligraphy = self.packages.${system}.kaligraphy; kanvas = self.packages.${system}.kanvas; };
    komponent = pkgs.callPackage ./komponent.nix { inherit k2Repo; };
    kaligraphy = pkgs.callPackage ./kaligraphy.nix { inherit k2Repo; komponent = self.packages.${system}.komponent; };
    kanvas = pkgs.callPackage ./kanvas.nix { inherit k2Repo; komponent = self.packages.${system}.komponent; };
  };
};
13:43:49
@whovian9369:matrix.orgWhovian9369 When trying to build kanvas I seem to actually be hitting CS0246 multiple times for Komponent and some other entries. (ByteOrder, BitOrder seem to be the other main prints for that error code.) 13:46:45
@whovian9369:matrix.orgWhovian9369Redacted or Malformed Event13:51:49

Show newer messages


Back to Room ListRoom Version: 9