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?
Well, i feel a little stupid, but in a problem while loading with a type load exception I used fuslogvw.
I think it should give you the order of dll bindings and therefore a first impression.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With