!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

121 Members
23 Servers

Load older messages


SenderMessageTime
24 Sep 2025
@corngood:corngood.comCorngoodhttps://learn.microsoft.com/en-us/dotnet/core/versions/selection#precedence03:48:54
@whovian9369:matrix.orgWhovian9369

Yeah it seems to be setting TargetFramework to net8.0 in build/_build.csproj so I'll need to patch that and possibly update Nuke.Common in the same csproj

<PackageReference Include="Nuke.Common" Version="8.0.0" />
03:49:50
@corngood:corngood.comCorngoodTry the roll forward options from that link first. It may be fine to target 8 and run on 903:51:02
@whovian9369:matrix.orgWhovian9369 Would you say the best solution is likely via env.DOTNET_ROLL_FORWARD = true? 03:51:35
@whovian9369:matrix.orgWhovian9369 * Would you say the best solution is likely via env.DOTNET_ROLL_FORWARD = "LatestMajor";? 03:51:57
@corngood:corngood.comCorngoodI'd give that a try at least 03:52:35
@whovian9369:matrix.orgWhovian9369

Good news is that Nuke ran, but throws...

...
Building stage 2 codegen project.
23:53:31 [ERR] Target Codegen has thrown an exception
System.PlatformNotSupportedException: BinaryFormatter serialization and deserialization have been removed. See https://aka.ms/binaryformatter for more information.
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
   at Nuke.Common.Tooling.SettingsEntityExtensions.NewInstance[T](T settingsEntity) in /_/source/Nuke.Tooling/SettingsEntity.NewInstance.cs:line 23
   at Nuke.Common.Tools.DotNet.DotNetRunSettingsExtensions.SetProjectFile[T](T toolSettings, String projectFile) in /_/source/Nuke.Common/Tools/DotNet/DotNet.Generated.cs:line 5507
   at LibHacBuild.Build.RunCodegenStage2() in /tmp/wat/nix/hactoolnet/source/build/Build.cs:line 658
   at LibHacBuild.Build.<get_Codegen>b__70_1() in /tmp/wat/nix/hactoolnet/source/build/Build.cs:line 206
   at Nuke.Common.Execution.BuildExecutor.<>c.<Execute>b__4_2(Action x) in /_/source/Nuke.Build/Execution/BuildExecutor.cs:line 119
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Nuke.Common.Execution.BuildExecutor.Execute(NukeBuild build, ExecutableTarget target, IReadOnlyCollection`1 previouslyExecutedTargets, Boolean failureMode) in /_/source/Nuke.Build/Execution/BuildExecutor.cs:line 119
...
03:53:56
@whovian9369:matrix.orgWhovian9369 *

Good news is that Nuke ran, but throws...

...
Building stage 2 codegen project.
23:53:31 [ERR] Target Codegen has thrown an exception
System.PlatformNotSupportedException: BinaryFormatter serialization and deserialization have been removed. See https://aka.ms/binaryformatter for more information.
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
   at Nuke.Common.Tooling.SettingsEntityExtensions.NewInstance[T](T settingsEntity) in /_/source/Nuke.Tooling/SettingsEntity.NewInstance.cs:line 23
   at Nuke.Common.Tools.DotNet.DotNetRunSettingsExtensions.SetProjectFile[T](T toolSettings, String projectFile) in /_/source/Nuke.Common/Tools/DotNet/DotNet.Generated.cs:line 5507
   at LibHacBuild.Build.RunCodegenStage2() in /tmp/wat/nix/hactoolnet/source/build/Build.cs:line 658
   at LibHacBuild.Build.<get_Codegen>b__70_1() in /tmp/wat/nix/hactoolnet/source/build/Build.cs:line 206
   at Nuke.Common.Execution.BuildExecutor.<>c.<Execute>b__4_2(Action x) in /_/source/Nuke.Build/Execution/BuildExecutor.cs:line 119
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Nuke.Common.Execution.BuildExecutor.Execute(NukeBuild build, ExecutableTarget target, IReadOnlyCollection`1 previouslyExecutedTargets, Boolean failureMode) in /_/source/Nuke.Build/Execution/BuildExecutor.cs:line 119
...
/nix/store/pkvy24cwwrsg3q3rqkhak8k6j98ns5gy-dotnet-sdk-9.0.305/share/dotnet/sdk/9.0.305/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file '/tmp/wat/nix/hactoolnet/source/src/hactoolnet/obj/project.assets.json' doesn't have a target for 'net9.0'. Ensure that restore has run and that you have included 'net9.0' in the TargetFrameworks for your project. [/tmp/wat/nix/hactoolnet/source/src/hactoolnet/hactoolnet.csproj]
    0 Warning(s)
    1 Error(s)
...
03:54:24
@corngood:corngood.comCorngood> Starting in .NET 9, the in-box BinaryFormatter implementation throws exceptions on use, Ugh. Maybe you need to build this with net8 runtime available.04:10:07
@whovian9369:matrix.orgWhovian9369Sounds like the best plan unfortunately, thanks. Happen to have a link to where the quote's from, please?04:10:39
@corngood:corngood.comCorngoodhttps://aka.ms/binaryformatter04:11:04
@whovian9369:matrix.orgWhovian9369 Either way, I was playing whack-a-mole with Nuke 9.0.x, so I wasn't having any luck with my plan either.
warning NU1603: Nuke.ProjectModel 9.0.3 depends on Microsoft.Build (>= 17.11.4) but Microsoft.Build 17.11.4 was not found. Microsoft.Build 17.12.6 was resolved instead.
04:11:32
@corngood:corngood.comCorngoodYou can use combinePackages to combine the 8 runtime with the 9 SDK, or both sdks04:11:48
@whovian9369:matrix.orgWhovian9369 *

Either way, I was playing whack-a-mole with Nuke 9.0.x, so I wasn't having any luck with my plan either.

... warning NU1603: Nuke.ProjectModel 9.0.3 depends on Microsoft.Build (>= 17.11.4) but Microsoft.Build 17.11.4 was not found. Microsoft.Build 17.12.6 was resolved instead.
... warning NU1701: Package 'Microsoft.Build 17.12.6' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net8.0'. This package may not be fully compatible with your project.

04:12:12
@whovian9369:matrix.orgWhovian9369 So separate dotnet-{runtime,sdk} wouldn't work for the former? 04:12:46
@corngood:corngood.comCorngoodI don't think it'll work because the muxer can't find it and only one will be in the path 04:13:32
@whovian9369:matrix.orgWhovian9369I'll probably have to mess with that on my own then, bleh. Thanks for the time!04:14:13
30 Sep 2025
@17lifers:mikuplushfarm.ovh17lifers (at mikuplushfarm) joined the room.16:05:18
@17lifers:mikuplushfarm.ovh17lifers (at mikuplushfarm) 16:06:51
@17lifers:mikuplushfarm.ovh17lifers (at mikuplushfarm) left the room.18:39:32
5 Oct 2025
@rosssmyth:matrix.org@rosssmyth:matrix.org left the room.01:47:21
@emma:rory.gayEmma [it/its]huh, i gotta build dotnet 10 from source23:55:59
@emma:rory.gayEmma [it/its]that doesnt sound very positive23:56:29
@emma:rory.gayEmma [it/its]

ah, seems it failed on hydra, and logs arent available: https://hydra.nixos.org/build/308971738

was cancelled though

23:59:38
6 Oct 2025
@corngood:corngood.comCorngoodhttps://github.com/NixOS/nixpkgs/issues/431811. I haven't been able to get a core dump or find a way to reproduce it.00:11:05
@emma:rory.gayEmma [it/its]clipboard.png
Download clipboard.png
13:35:03
@emma:rory.gayEmma [it/its]thought it would take more than half an hour to build dotnet-sdk 10 lol13:35:14
@emma:rory.gayEmma [it/its]was unable to reproduce here too13:36:01
@corngood:corngood.comCorngoodIf anyone has more rights than me on hydra, that might be helpful for reproducing this, or possibly getting a core dump. I've tried poking around with various system limits, but I'm not quite sure what to try next.14:02:20
@tris203:matrix.orgtris203 I can reproduce in a garnix builder. The garnix guys did say they could help get logs from their builders. But then went quiet 14:52:58

Show newer messages


Back to Room ListRoom Version: 9