Dll throws Error on non dev machine

Posted on 2008-02-11
Medium Priority
Last Modified: 2013-11-26
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?
Question by:pjsulin
LVL 13

Expert Comment

ID: 20870718
Don't you register these dlls when you deploy your app ? Did you use tlbimp.exe to generate the .Net wrapper of your native C++ dll ?

Accepted Solution

pjsulin earned 0 total points
ID: 20951019
The problem was that I was running two different versions of the dlls, the newer was suppose to be backwards compatible but was not.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

SingleRun is a tool that ensures that only one instance of an application is started, running it again brings the application to focus.
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…
Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question