We are evaluating Prof-UIS MFC for use in an in-house application at my company. I’ve used the free version of Prof-UIS successfully in the past, and am familiar with the process of building the libraries, integrating them with the IDE, and so forth. The issue I am having (which is holding up our evaluation) is that while I’m able to compile and link the Prof-UIS libraries successfully, when I go to run our application with Prof-UIS I get the following error:
"An unhandled exception of type ’System.IO.FileLoadException’ occurred in
Unknown Module. Additional information: Could not load file or assembly ’OurApplicationName,
Version=1.0.2207.30381, Culture=neutral, PublicKeyToken=f456eafc1bd82344’ or
one of its dependencies. Could not find or load a type. (Exception from
I did some research and it turns out that this error relates to a .NET restriction on the number of global fields allowed in an assembly built under /clr (please view the following links for more info):http://www.thescripts.com/forum/thread445787.htmlhttp://aspalliance.com/groups/microsoft_public_dotnet_languages_vc/ng-1351975_Could_not_load_Assembly.aspxhttp://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=165750&SiteID=1http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=137548&SiteID=1
I should mention that our application is a mixed-mode MFC application which has a lot of native code and occasionally we host a managed .NET window using the MFC wrappers. We’re building with /clr, in other words, and it produces the above error - regardless of whether I link to the DLL or static lib version of Prof-UIS.
If I take Prof-UIS out, the error goes away. If I keep Prof-UIS in, but removed the managed code from our projects, compiling everything natively without /clr, everything works fine. It’s only when I both a) have /clr turned on and b) try to use Prof-UIS that I get the error.
So, I believe but am not positive that the Prof-UIS component is triggering this error, as I know it uses a large number of global fields, string literals, and other elements which contribute to the error (please follow the links for details). I was wondering if you guys had any information on this error or, alternately, information about customers who’ve successfully used Prof-UIS in a managed environment.
Again, this issue is preventing me from demonstrating the Prof-UIS library to the people with the authority to make the purchase. Please help me to resolve this issue.