Is it possible to execute any user-provided code before the .NET Main method?
It would be acceptable if the code had to be unmanaged.
The reason for asking is that this might be a way to solve the problem of calling SetCurrentProcessExplicitAppUserModelID before any UI elements are displayed (as mentioned in Grouping separate processes in the Windows Taskbar)
In C# you can add a static constructor to the class which contains the main method.  The code in the static constructor will be executed before main.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With