C#
Every time I run my porgram I get this exception:
But when I run in debug mode, there i
For me, had some null references in the OnLoad() of a XAML project (and it threw OP's nebulous error). Just as Lasse Vågsæther Karlsen answered, looking at the inner exception's stacktrace got me to the line number.