Open AlizerUncaged opened 1 year ago
I have one question:
1) Are you using the Nuget Package or did you clone thee repository and kind of copy/paste/piecemeal your solution together. In your own solution I highly recommend adding the Nuget Package NotificationIconSharp to your project.
Right Click Project -> Manage Nuget Packages -> Browse Tab -> Search "NotificationIconSharp" and install it.
You can also use the dotnet command line:
dotnet add package NotificationIconSharp --version 1.0.1
Then you can delete everything you tried to do in the .csproj file as it is not needed, the nuget package takes care of everything.
This error tends to come up when a native C/C++ dll dependency doesn't load, it either is not in the correct location in the project output or it has an invalid format for the CPU architecture you are running on. Nuget handles this, the package contains both x86 and x64 dlls of the native code, so when you target "Any CPU" the dotnet runtime figures out exactly which dll it needs to load from the nuget package at runtime.
Otherwise, if you wouldn't mind sharing more of your project maybe reducing it to the point of it being just the tray icon code and a broken build I would be more than happy to take a look.
I'm getting the same exception, also in an Avalonia project, and I'm using the Nuget package.
I get the following exception when running the
NotificationManager.Initialize()
commandthe following code is in the function
I also checked the .csproject file and copied the same settings from the
Demo
project and I still get the same error