* Improve error reporting when Crossgen2 crashes on Managed C++
Based on Manish's feedback from another PR I investigated options
to improve Crossgen2 diagnostics in the presence of Managed C++
that currently crashes the metadata reader in several places.
This is the barebones version of such support, centralizing detection
and reporting of the failures. Right now we don't have any pretty
way of reporting localized strings from this low-level code, I'll
welcome any suggestions how to polish the change in that direction.
Thanks
Tomas
* Make Managed C++ scanning upfront per JanK's PR feedback
* Fix Managed C++ check based on JanK's advice; Simon's feedback
I have changed the check to use the CorFlags.ILOnly / ILLibrary
combination (both bits must be zero for an assembly to be MC++).
Per Simon's suggestion I have moved the check outside of the
Run method. As part of that I have changed typeSystemContext
to a field on the Program class as a first step in breaking Run
into several smaller methods.
Thanks
Tomas