Silient System.NotSupportException exceptions during WPF application startup

92 views Asked by At

I'm profiling the performance of a WPF (.Net 4.0 on Win7) using Ants Profiler and I'm observing startup exceptions being reported in Ants Profiler but I'm not observing them in the application or VS debugger.

Importantly the application starts up and runs as expected.

The application has the following exception handler setup in the constructor of the App class but these do not trap the exceptions:

DispatcherUnhandledException += OnDispatcherUnhandledException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException;

Even with VS setup to 'break into exceptions' (Ctrl+Alt+E) setup I'm not observing any of these exceptions in the debugger.

The exceptions are related to XAML, I'm thinking these are possibly related to styles being applied in the XAML when the data templates are loaded as the Ants Profiler is only observing them when the application starts. Example type and message shown below:

Type = System.NotSupportedException

Message = Cannot convert the value in attribute 'property' to object of type 'system.windows.dependencyproperty'

Without being able to break into the exceptions during startup I'm unable to find the offending definition or discount the exceptions as something caused by attaching\using Ants Profiler.

Anyone else ever seen anything similar?

0

There are 0 answers