I have an application that terminates with a NullReferenceException when I run it from the console in release mode. It runs fine in debug mode or in the debugger. The program terminates with the following output: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
No stack trace is shown, A visual studio just in time debugger dialog also pops up, however it also has no stack trace.
The pdb files are present.
How can I get visual studio to give me a stack trace?
I have tried setting AppDomain.CurrentDomain.UnhandledException, which does not catch the exception, as well as try/catch everywhere.
This is a console app, which uses a csharp dll, which in turn uses a c++ dll.
I know what a NullReferenceException is, and how to fix it - I just can't find it