I've started getting an InvalidOperationException
in VS2012 Ultimate saying:
"Dispatcher processing has been suspended, but messages are still being processed."
...whenever I call a MessagBox
anywhere in a UserControl
's code-behind. This currently appears to affect every project on my computer, including those that I've downloaded and a fresh project with no real code other than the UserControl itself. This only seems to affect UserControl
s, however; standard classes and Windows' code-behinds work fine.
System.InvalidOperationException occurred
HResult=-2146233079
Message=Dispatcher processing has been suspended, but messages are still being processed.
Source=WindowsBase
StackTrace: at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
InnerException:
InnerException is blank because according to VS, it's null. Does this issue make any sense to anybody? After a Google search, I found a few instances where this exception had been thrown, but none of those situations were anything like this. I'm hoping somebody here might have some knowledge on what may be causing this and could possibly be able to help me before I resort to reinstalling VS and hoping for the best.
Any ideas at all on how to fix this would be greatly appreciated.
Per Mark Hall's request: A class as simple as this will cause the exception:
public partial class TestView : UserControl
{
public TestView()
{
InitializeComponent();
System.Windows.MessageBox.Show("Test");
}
}