引用的DLL无法添加 [英] A reference to the dll could not be added

查看:947
本文介绍了引用的DLL无法添加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我添加一个.dll文件在C#应用程序中引用它显示了一个错误:

When I add a .dll file as a reference in C# application it shows an error :

一提到.... DLL不能added.Please确保   该文件是可访问,并且它是一个有效的组件或COM   组成部分。

A reference to the "....dll" could not be added.Please make sure that the file is accessible and that it is a valid assembly or COM component.

ILDissassembler说,有没有有效的CLR头,所以我尝试使用REGSVR32注册,这给了我另一个错误:

ILDissassembler says there is no valid CLR header so I try to register it using regsvr32 and that gives me another error:

模块,已加载,但调用的DLLRegisterServer失败,   错误code'0x80004005的

The module "" was loaded but the call to DLLRegisterServer failed with error code '0x80004005'

我使用的是64位的Windows 7机器上VS2010的最终版本。可能是什么问题?

I am using VS2010 ultimate version on a 64bit Windows 7 machine. What could be the problem?

感谢您的任何提示/回复

Thanks for any hints/replies

推荐答案

我用的Dependency Walker检查出内部引用该DLL有。原来它是需要VB运行库MSVBVM60.DLL和因为我开发框犯规有安装我无法使用REGSVR32注册它

I used dependency walker to check out the internal references the dll was having. Turns out it was in need of the VB runtime msvbvm60.dll and since my dev box doesnt have that installed I was unable to register it using regsvr32

这似乎是答案,我原来的问题现在。

That seems to be the answer to my original question for now.

这篇关于引用的DLL无法添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆