I have a WPF App which references a .NET Standard 2.0 library which contains ViewModels and uses MvvmLight. I've created an error handler which listens for messages from the ViewModels using GalaSoft.MvvmLight.Messaging.Messenger
.
In visual studio, the app runs fine, but when I publish the app using ClickOnce then attempt to install and run it, the following exception occurs:
The exception is thrown from the following line:
Messenger.Default.Register<Error>(this, ErrorHandler.DisplayError);
I was able to recreate the failure in a mostly empty project. The following is a link to a github repo with the project, if you'd like to see for yourself: SystemRuntimeFail Demo
After 3 days searching through stackoverflow posts for information on how to fix this and trying just about everything, I'm very nearly at my wit's end. Please help!