首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法加载Dll依赖项。怎么读杂音?

无法加载Dll依赖项。怎么读杂音?
EN

Stack Overflow用户
提问于 2015-08-24 01:51:28
回答 1查看 628关注 0票数 2

背景

我正在用C#制作一个程序,它使用默认的Kinect融合演示来进行3D扫描。我在这个程序中添加了很多不同的东西,我已经快完成了。通过在VS2013上进行调试,它可以完美地工作。我还创建了一个安装程序,但是当我运行已安装的应用程序时,我会得到一些错误,我将把这些错误放在下面。我使用的是日文版本的Windows (8.1 64位),这意味着我必须翻译所有显示给我的错误。这意味着我在这里显示的错误可能不是100%的逻辑或正确的。我在C#方面也不是很有经验,所以我可能会忽略一些非常基本的东西。所以请随便问任何问题。我很可能是这样的,因为我对这些东西不太了解,我可能错过了一些对更有经验的人来说很容易的事情。

有关该程序的更多信息:

  • 它的主动解决方案平台是x64 (它仍然安装在x86中,不确定这是否重要);
  • 它需要管理员访问才能运行;
  • "Program (x86)“中还有另一个目录,它的同名(3D-Scanner)包含了移除地板所需的不同应用程序。这可能会影响查找/搜索的可能性吗?我最初的计划是让他们进入同一张地图,但系统创建了两幅相同的地图;
  • 我使用的默认Kinect融合程序是64位。在此之前,我遇到了一些问题,因为我的应用程序无法创建一个作为32位项目的64位引用的安装程序。我把它切换到一个64位的项目,安装程序看起来很好(除了缺少的dll引用)。

错误

当应用程序崩溃并开始使用VS2013调试它时,我会得到以下错误:

代码语言:javascript
复制
An unhandled exception of type 'System.IO.FileLoadException' occurred in PresentationCore.dll

Additional information: 
    file or assembly 'Microsoft.Kinect.Fusion, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35', or one of its dependencies could not be loaded. 
    Manifest definition of the found assembly does not match the assembly reference. (Exception from HRESULT: 0x80131040)

当我在VS2013中打开它时,我还会得到消息“调用堆栈只包含外部代码”。当我禁用“只是我的代码”时,我基本上会看到一些机器代码语言或其他任何东西。我不认为这很相关,所以我不会把它放在这里。如果需要看这段代码,请通知我,我会在这里发布。

以下是“带有外部代码的调用堆栈”(我必须使用图像,因为调用堆栈不可复制):

我试过什么

嗯,在阅读了一下之后,我当然发现,由于程序中缺少引用/依赖,所以我得到了这个错误。这对我来说有点奇怪,因为它在调试中起作用。不管怎样,我试着出发,试图找出我错过的是什么。我已经在文件上使用了依赖步行器来查看它会显示什么,但是我做不到。这是一个如此庞大的数据,我不知道我在寻找什么。

因此,我启动了Fuslogvw.exe,看看我是否可以找到一些错误的方式。它确实让我离得更近。输出似乎更符合逻辑,但我仍然不知道我在寻找什么。再次请注意,由于我在日本系统上工作,我不得不翻译这些日志,这就是为什么日志看起来有点差。下面是程序的工作调试版本上的Microsoft.Kinect.Fusion dll的输出(我认为它会造成麻烦):

代码语言:javascript
复制
 *** Assembly bind log entry (2015/08/24 @ 10:38:40) ***

 We were successful in the operation.
 Bind Result:. Hr = 0x0 I The operation completed successfully.

 Assembly manager to read from: C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ clr.dll
 It is running under the executable file.  C: \ Users \ bono \ Documents \ Visual Studio 2013 \ Projects \ 3D-Scanner \ 3D-Scanner \ bin \ x64 \ Release \ 3D-Scanner.vshost.exe
 --- Detailed error log is as follows.

 === Pre-bind state information ===
 Log: DisplayName = Microsoft.Kinect.Fusion, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35
  (Fully-specified)
 Log: Appbase = file: /// C: / Users / bono / documents / visual studio 2013 / Projects / 3D-Scanner / 3D-Scanner / bin / x64 / Release /
 Log: Initial PrivatePath = NULL
 Log: Dynamic Base = NULL
 Log: Cache Base = NULL
 Log: AppName = 3D-Scanner.vshost.exe
 the calling assembly: 3D-Scanner, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null
 ===
 Log: This bind starts in read context of default.
 Log: The application configuration file C: I use the \ Users \ bono \ documents \ visual studio 2013 \ Projects \ 3D-Scanner \ 3D-Scanner \ bin \ x64 \ Release \ 3D-Scanner.vshost.exe.Config.
 Log: I use the host configuration file.
 Log: C: I use the computer configuration file from the \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ config \ machine.config.
 Log: reference after policy: Microsoft.Kinect.Fusion, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35
 Log: I failed to GAC look up.
 Log: A new URL file: /// C: / Users / bono / documents / visual studio 2013 / Projects / 3D-Scanner / 3D-Scanner / bin / x64 / Release / Microsoft.Kinect.Fusion.DLL and trying to download You.
 Log: I succeeded in downloading the assembly.  The next file you are trying to set up: C: \ Users \ bono \ documents \ visual studio 2013 \ Projects \ 3D-Scanner \ 3D-Scanner \ bin \ x64 \ Release \ Microsoft.Kinect.Fusion.dll
 Log: I went into the setup phase of execution from the source.
 Log: assembly name Microsoft.Kinect.Fusion, Version = 2.0.0.0, Culture = neutral, is PublicKeyToken = 31bf3856ad364e35.
 Log: I succeeded to bind.  C: it will return the \ Users \ bono \ documents \ visual studio 2013 \ Projects \ 3D-Scanner \ 3D-Scanner \ bin \ assembly from x64 \ Release \ Microsoft.Kinect.Fusion.dll.
 Error: the assembly has been loaded in the default read context.

以下是程序的非工作安装版本:

代码语言:javascript
复制
 *** Assembly bind log entry (2015/08/24 @ 10:34:17) ***

 It failed in operation.
 Bind Result:. Hr = 0x80131040 but there is no description.

 Assembly manager to read from: C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ clr.dll
 It is running under the executable file.  C: \ Program Files (x86) \ 3D-Scanner \ 3D-Scanner \ 3D-Scanner.exe
 --- Detailed error log is as follows.

 === Pre-bind state information ===
 Log: DisplayName = Microsoft.Kinect.Fusion, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35
  (Fully-specified)
 Log: Appbase = file: /// C: / Program Files (x86) / 3D-Scanner / 3D-Scanner /
 Log: Initial PrivatePath = NULL
 Log: Dynamic Base = NULL
 Log: Cache Base = NULL
 Log: AppName = 3D-Scanner.exe
 the calling assembly: 3D-Scanner, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null
 ===
 Log: This bind starts in read context of default.
 Log: The application configuration file C: I use the \ Program Files (x86) \ 3D-Scanner \ 3D-Scanner \ 3D-Scanner.exe.Config.
 Log: I use the host configuration file.
 Log: C: I use the computer configuration file from the \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ config \ machine.config.
 Log: reference after policy: Microsoft.Kinect.Fusion, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35
 Log: I failed to GAC look up.
 Log: A new URL file: /// C: / Program Files I am trying to download the (x86) /3D-Scanner/3D-Scanner/Microsoft.Kinect.Fusion.DLL.
 Log: I succeeded in downloading the assembly.  The next file you are trying to set up: C: \ Program Files (x86) \ 3D-Scanner \ 3D-Scanner \ Microsoft.Kinect.Fusion.dll
 Log: I went into the setup phase of execution from the source.
 Log: assembly name Microsoft.Kinect.Fusion, Version = 0.0.0.0, Culture = neutral, is PublicKeyToken = null.
 Warning: The results of the comparison of the assembly name, mismatch of Major Version found.
 Error: assembly references, it did not match the found assembly definition.
 Error: set-up phase of execution from the source failed (hr = 0x80131040).
 Error: Could not complete the setup of assembly (hr = 0x80131040).  Survey it was canceled.

我想丢失的信息就在那里,但我不知道该怎么理解。当涉及到挑选有用的信息时,我将非常感谢你的帮助。

更多信息

我不确定这是否完全必要,但我认为它可能值得它显示我的安装程序文件。也许我漏掉了导致这个dll引用丢失的东西。我只使用所有可用的文件(据我所知)作为目标文件,但我可能遗漏了一些东西。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-08-24 02:20:28

这看起来像是版本不匹配的问题。来自非工作环境的日志显示,找到的版本为0.0.0.0,而预期版本为2.0.0.0。

代码语言:javascript
复制
Log: assembly name Microsoft.Kinect.Fusion, Version = 0.0.0.0, Culture = neutral, is PublicKeyToken = null.
Warning: The results of the comparison of the assembly name, mismatch of Major Version found.
Error: assembly references, it did not match the found assembly definition.
Error: set-up phase of execution from the source failed (hr = 0x80131040).
Error: Could not complete the setup of assembly (hr = 0x80131040).  Survey it was canceled.

若要解决此问题,请将dll的正确版本复制到非工作环境中。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32173455

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档