C
C#2y ago
Aqua

❔ Microsoft.XmlSerializer.Generator causes failure to load assembly System.Runtime

Hey all, as a way to get my program running under NativeAOT I've been looking into the Microsoft.XmlSerializer.Generator, however while it generates fine, on trying to serialize anything I get this exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. All of the projects it is trying to serialize are all .net 7, using a .net 7 sdk version as well. I checked the System.Runtime version these projects reference and it is indeed version 7.0.0.0, so I am not sure what is happening here. Any ideas? Thanks.
2 Replies
Aqua
AquaOP2y ago
I should mention this only happens on publish with trimming. I'm not publishing with AOT just yet as I just want to get this working first.
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server