Exception thrown while loading an assembly.

We have taken a set of existing C++ libraries and compiled them using /clr under VS2005 RC1.  To avoid the double-thunking penalty, I was experimenting with converting them to static libraries and then linking them together in one large DLL.

This seems to be working (although I seem to have to explicitly include .obj files for newer fully managed classes).  However, when I go to load this assembly using a test executable (that basically just does a: System::AppDomain::CurrentDomain->Load( "PL" ); ), an exception is being thrown.  The outer exception is a generic "Could not load assembly".  The message for the inner exception is: 

InnerException   0x00921164 { "Internal limitation: too many fields."}

Any suggestions for tracking down the source of this problem  


Answer this question

Exception thrown while loading an assembly.

  • Biodegradable

    try to open your assembly with ildasm.exe. this may provide a clue if the generated assembly is valid or not

  • Exception thrown while loading an assembly.