I've been using Prism 4.1 and have numerous classes that subscribe to events (usually in their constructor) using the IEventAggregator
and the ThreadOption.UIThread
option.
I've now upgraded to Prism 6 but when I run my application it falls over on one such line with an InvalidOperationException. The message is:
To use the UIThread option for subscribing, the EventAggregator must be constructed on the UI thread
The call stack shows that the class in question is being resolved by my DI container (Castle Windsor) hence why it's not on the UI thread. However it all worked fine with Prism 4.1 so what's changed?