I am having a problem with a third party dll when installing my applications on some other machines. Note that it works fine on some machines and not on others. My application references a dll called UNIVOPT_CSLOADER.dll which is a .NET wrapper for the C++ dll, CSUNIVOPT. When it fails it throws this error message: The type initializer for "CSUNIVOPT" threw an exception. Looking at the stack trace this happens when I first try to call a function from this dll.
The dll in my application, UNIVOPT_CSLOADER, resides in my applications directory and the other dlls are in my System32 dir. These other dlls also reside in the C:\MBRM dir, the install directory for this product, but I have renamed them and run the application to confirm that it is calling the ones in the System32 dir.
If I move this application into the C:\MBRM directory it runs fine, but if I try and move all the dlls into from the MBRM dir into my apps dir I have the same problem.
Why would the same dll's try to load their dependant dlls from different places on different machines?