开发者

DLL not found in distributed application

I've written a pretty simple Windows Form Application that calls an unmanaged DLL to perform most of the actual calculations done by the program. The program runs fine in Debug and Release modes. It also installs correctly and runs on the development computer.

The problem arises when I attempt to install it on target computer (running the same operating system: 64bit Windows 7). Despite the DLL being in the same directory as the .exe file, I'm getting a "DLL Not Found Exception". I'm getting this exception when I attempt both OneClick publishing as well as when I use a .msi installation file. The error will even cite the location of the file while stating the file could not be fou开发者_Go百科nd.

Is one of my installer settings incorrect? Am I not including the DLL or a reference in the appropriate place? Any help or advice would be appreciated.

Thanks.


The DLL you deployed may have additional dependencies that you haven't deployed. If those dependencies aren't there then you'll generally get this type of error.

UPDATE:

The "D" in MSVCR100D means that it's the debug version of the library. That most likely isn't on the target system and licensing prevents you from deploying it.

You need to do a full recompile under Release mode. Once that is done your DLL should target MSVCR100 (note the lack of "D") instead. If not, then you probably have a debug build of that assembly. Locate a release version and link to that.


If you are invoking the unmanaged code by calling CreateObject then make sure that you have registered the unmanaged DLL on target computer as well.


In a post about a similar 'dll not found' error at Microsoft: http://support.microsoft.com/kb/319114 you can learn how to fix this problem based on the fact that it might happen due to: 1) Missing or corrupt dll file (also here) 2) The registration path which is calling that that dll is probably wrong/missing/damaged somehow. Otherwise you might want to verify that new virus/malware is around...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜