Share via


Huge amounts of exceptions in the VS2019 output window with WPF

Question

Sunday, January 12, 2020 3:10 PM

I am using VS2019 Community Edition with a WPF project, and have noticed a large amount of exceptions in the output window. The code runs fine. I have only noticed these recently.

This seems to happen with any WPF project, so it's not related to any specific code or XAML, but only happens in VS2019. If I run the same project in VS2017 Enterprise, I don't get the exceptions.

I get a lot of the following...

Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in Microsoft.CSharp.dll
Exception thrown: 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in System.Core.dll
Exception thrown: 'System.DllNotFoundException' in WindowsBase.dll
Exception thrown: 'System.EntryPointNotFoundException' in PresentationCore.dll
Exception thrown: 'System.EntryPointNotFoundException' in WindowsBase.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
Exception thrown: 'System.IO.IOException' in mscorlib.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.Threading.ThreadAbortException' in Unknown Module.

I can get very large amounts of these, not in any obvious order or pattern.

My exceptions settings are as follows...



I've checked with other developers in my team, and most of them have more settings on than I do, but don't get these messages.

Anyone any ideas why? It makes it very hard to use the output window for what it's supposed to be used for.

Thanks

All replies (5)

Tuesday, January 14, 2020 2:48 PM ✅Answered

Just realised that it was fairly easy (if a little boring) to investigate.

I reset to the default, then imported one section at a time until I saw the messages. That enabled me to see which section was the culprit. In my case it was the Options -> Debugging (no surprise there).

I reset again, took a screenshot of this section in the Tools -> Options window, then imported my saved settings and compared the two.

It turned out that I had the "Enable Just My Code" checkbox disabled. When I checked that, the messages did not show up.

So, I'm still puzzled why this would happen, but at least now I know what the problem was!

Thanks again.


Monday, January 13, 2020 9:11 AM

Hi Mr Yossu,

Welcome to MSDN forum.

For your requirement, please open Visual Studio -> Debug -> Windows -> Exceptions Settings and then find the “Common Language Runtime Exceptions” in the “Exception Settings” window and disable it(maybe some of them, if some of them are enabled) to check if this works.

Hope this could help you and any feedback will be expected.

Best Regards,

Tianyu

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


Monday, January 13, 2020 2:31 PM

Hello Tianyu, thanks for the reply.

I only have four exceptions ticked in that list, and as the list I pasted in my first post contains 11 distinct exceptions (there may have been more in the output window, I just copied a sample and removed duplicates), I'm not sure this is the issue.

However, in order to test this anyway, I disabled two that didn't look useful to me, leaving only System.NullReferenceException and System.Windows.Markup.XamlParseException, and tried running again, but I got a long list of other exceptions in the output window...

Exception thrown: 'System.DllNotFoundException' in WindowsBase.dll
Exception thrown: 'System.EntryPointNotFoundException' in WindowsBase.dll
Exception thrown: 'System.EntryPointNotFoundException' in PresentationCore.dll
Exception thrown: 'System.EntryPointNotFoundException' in PresentationCore.dll
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
Exception thrown: 'System.EntryPointNotFoundException' in PresentationCore.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Xml.XmlException' in System.Xml.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll
Exception thrown: 'System.InvalidCastException' in PresentationFramework.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationFramework.dll
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsBase.dll
Exception thrown: 'System.InvalidOperationException' in PresentationFramework.dll
Exception thrown: 'System.PlatformNotSupportedException' in PresentationFramework.dll

Any other ideas? Thanks


Tuesday, January 14, 2020 8:30 AM

Hi Mr Yossu,

Thank you for your feedback.

Forget to say, you could try to click “Restore the list to the default settings” button to restore the Exception Settings.

In addition, you could try steps/suggestions below to troubleshoot.

#1. Open “Developer Command Prompt for VS 2019” -> enter “devenv /ResetSettings” to restore VS default settings.

#2. Open VS -> Tools -> Import and Export Settings… -> choose “Reset all settings” -> Next -> “No, just reset settings, overwriting my current settings” -> Next -> Finish(Note, this will reset/overwrite your current settings and make the environment closely match earlier versions of the application)

Hope this could help you and any feedback will be expected.

Best Regards,

Tianyu

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


Tuesday, January 14, 2020 2:35 PM

Hello, thanks again for your help.

Resetting the exceptions to their defaults didn't do anything, but resetting all settings did. When I restored my settings back afterwards, the exceptions returned, so it's obviously something somewhere in my settings that's not in the exceptions section.

How would I go about working out what is causing it?

Thanks again.