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
mainmethod. The code in the static constructor will be executed beforemain.