I have a complex C++/CLI application with numerous modules (a few dozens), some managed some unmanaged. Recently we switched from Visual Studio 2013 to Visual Studio 2015. It's working on some computers but not on others.
When the program isn't working, it crashes even before the first line of main. It reports an Access Violation Exception in _onexit . When ignoring some of the exceptions and assertions I see that a <Module> threw a TypeInitializationException .
Problem is - I have no idea which one. I can see when DLLs are loaded in the Output window. The last DLL to load is System.dll - surely my bug is not there. So I need a way to trace static variable initialization in managed DLLs so I can figure out which DLL is problematic, then I can track down the problematic initialization.
How can I do that?
TypeInitializationExceptionshould have that information in its details. You should also have a stack trace. - Ben Voigt<Module>which is a C++/CLI type containing all of a modules global variables and functions. So I need to trace the initializations. - zmbq