none
添加引用问题 RRS feed

  • 问题

  • 试图运行项目时出错:未能加载文件或程序集 "sms.dll "或它的某一个依赖项。该模块应包含一个程序集清单

    可是我已经把sms.dll拷贝到debug目录下了,还是不行。
    和sms.dll相关的文件我到处都拷贝了还是不行。。。。怎么解决啊?出了什么问题呢?
    我添加引用的时候他说请确保这个是一个有效的程序集或com组件
    2009年9月9日 7:13

答案

  • 你好,

    你是否可以使用Reflector来检查SMS.Dll的实现来确定这是.NET的程序集还是native的Dll:
    http://www.red-gate.com/products/reflector/

    如果这是一个.NET的程序集, 看下这篇文章,使用Fusion Log Viewer去帮助解决这个问题:
    http://msdn.microsoft.com/en-us/magazine/dd727509.aspx

    Use Fusion Log Viewer
    There are times when assembly binding fails, typically with an exception (usually, FileNotFoundException, FileLoadException, or BadImageFormatException). Often, a little insight into the internals of the Binder can help you debug the issue at hand.

    The Microsoft .NET Framework SDK includes a tool called Assembly Binding Log Viewer (fuslogvw.exe), often referred to as Fusion Log Viewer. This tool logs specific Binding steps in .html files that can be viewed using the Fusion Log Viewer's user interface.

    Best regards,
    Riquel
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    2009年9月11日 4:03
    版主

全部回复

  • 你好!
         你的这个dll不是标准的托管程序集或者不是标准的COM组件就会出现这个情况!
         你需要重新编写这个dll,写成托管程序集或COM组件才可以引用!
    周雪峰
    2009年9月9日 7:17
    版主
  • 你好,

    你是否可以使用Reflector来检查SMS.Dll的实现来确定这是.NET的程序集还是native的Dll:
    http://www.red-gate.com/products/reflector/

    如果这是一个.NET的程序集, 看下这篇文章,使用Fusion Log Viewer去帮助解决这个问题:
    http://msdn.microsoft.com/en-us/magazine/dd727509.aspx

    Use Fusion Log Viewer
    There are times when assembly binding fails, typically with an exception (usually, FileNotFoundException, FileLoadException, or BadImageFormatException). Often, a little insight into the internals of the Binder can help you debug the issue at hand.

    The Microsoft .NET Framework SDK includes a tool called Assembly Binding Log Viewer (fuslogvw.exe), often referred to as Fusion Log Viewer. This tool logs specific Binding steps in .html files that can be viewed using the Fusion Log Viewer's user interface.

    Best regards,
    Riquel
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    2009年9月11日 4:03
    版主