简体   繁体   English

找不到dll程序集或依赖项

[英]dll assembly or dependency not found

I have a dll which is used as interface to another application. 我有一个用作其他应用程序接口的dll。 If I try to use the dll in a program under Windows 7 x64 I got an exception during runtime that the assembly or a dependency of the assembly could not be found. 如果我尝试在Windows 7 x64下的程序中使用dll,则在运行时会出现一个异常,即找不到程序集或程序集的依赖项。

I used dependency walker which gave me this output: 我使用了依赖项遍历器,它给出了以下输出: 在此处输入图片说明

I know this may be a duplicate of Win 7, 64 bit, dll problems but I was not able to resolve the issue. 我知道这可能是Win 7、64位,dll问题的重复,但我无法解决问题。

Any help is appreciated. 任何帮助表示赞赏。

Kind regards, Fox 亲切的问候,福克斯

Try to clean Debug and Release folders in your solution. 尝试清理解决方案中的“调试”和“发布”文件夹。 Then remove and add unity again. 然后删除并再次添加统一。

Or 要么

1: - Check if you are referencing an assembly which in turn referencing an old version of unity. 1:-检查是否引用了程序集,而该程序集又引用了旧的unity版本。 For example let's say you have an assembly called ServiceLocator.dll which needs an old version of Unity assembly, now when you reference the ServiceLocator you should provide it with the old version of Unity, and that makes the problem. 例如,假设您有一个名为ServiceLocator.dll的程序集,该程序集需要一个旧版本的Unity程序集,现在,当您引用ServiceLocator时,您应该为它提供旧版本的Unity,这便引起了问题。

2: - May be the output folder where all projects build their assemblies, has an old version of unity. 2:-可能是所有项目都在其中生成其程序集的输出文件夹,具有统一的旧版本。

You can use FusLogVw to find out who is loading the old assemblies, just define a path for the log, and run your solution, then check (in FusLogvw) the first line where the Unity assembly is loaded, double click it and see the calling assembly, and here you go. 您可以使用FusLogVw找出谁正在加载旧程序集,只需定义日志路径,然后运行解决方案,然后检查(在FusLogvw中)Unity程序集的加载第一行,双击它并查看调用组装,就可以开始了。

The failure was on my side. 失败就在我这边。

I had two .dll files in my directory nearly the same name. 我的目录中有两个几乎相同名称的.dll文件。 One was about 6MB the other one only 50KB which seems to be some kind of wrapper. 一个约为6MB,另一个约为50KB,这似乎是某种包装。 Setting the reference to the 6MB file solved the issue. 设置对6MB文件的引用可以解决此问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 加载后未找到另一个DLL的DLL依赖关系 - DLL dependency of another DLL not found though loaded 为什么找不到NUnit文件或程序集(C#dll)? - Why can't NUnit file or assembly be found (C# dll)? discord.net.commands.dll 未找到或缺少程序集文件 - discord.net.commands.dll either not found or missing assembly file addinSpy警告未找到DLL路径。 GAC中我的dll或程序集出现问题 - addinSpy warns DLL path is not found. Issue with my dll or Assembly in the GAC 无法加载文件或程序集“ChilkatDotNet45.dll”或其依赖项之一。 ......在IIS中部署后 - Could not load file or assembly "ChilkatDotNet45.dll" or one of its dependency. ......After deploying in IIS 无法加载文件或程序集“ idrsnet15.dll”或其依赖项之一。 指定的模块无法找到 - Could not load file or assembly 'idrsnet15.dll' or one of its dependencies. The specified module could not be found 无法加载文件或程序集“ClearScriptV8-32.DLL”或其依赖项之一。 指定的模块无法找到 - Could not load file or assembly 'ClearScriptV8-32.DLL' or one of its dependencies. The specified module could not be found 使用Assembly.LoadFrom()加载托管的C ++ dll时找不到文件异常 - When loading managed c++ dll using Assembly.LoadFrom() receive file not found exception 无法加载文件或程序集“CopyModules.dll”或其依赖项之一。指定的模块无法找到 - Could not load file or assembly 'CopyModules.dll' or one of its dependencies. The specified module could not be found 无法加载文件或程序集“xxx.dll”或其依赖项之一。 指定的模块无法找到 - Could not load file or assembly 'xxx.dll' or one of its dependencies. The specified module could not be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM