Microsoft.Toolkit.Uwp.Notifications version 7.1.3 in .NET 8 console app throwing "Invalid IL or CLR metadata" when publishing aot #291
Unanswered
cricketthomas
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to add native notifications to an Avalonia app using Microsoft.Toolkit.Uwp.Notifications version 7.1.3 in a .net 8 app targeting windows.
There are warnings or errors being shown when i run a dotnet publish using AOT. I have been trying to preserve all resources and stop them from being trimmed but I can't seem to figure out why they keep getting trimmed, or its something else.
The app works fine when published as a single file or not trimmed, I am wondering if its at all possible to even use this library with AOT.
my csproj ive tried with trim mode link and partial:
Heres my roots file (ive been trying a lot)
Here is the trimming message/errors:
Here is the code that where I am showing the notification:
Here is the runtime error:
Often I also get the message "Failed initializing notifications" or that they are unavailable for this platform, so I assume there is more going on that I can't quite figure out.
Beta Was this translation helpful? Give feedback.
All reactions