如何找到取决于特定依赖项的特定版本的内容?

Nei*_*ell 14 .net c# dll dependencies visual-studio

我在运行应用程序时遇到此错误(不是在编译时):

无法加载文件或程序集'Castle.Windsor,Version = 2.1.0.0,Culture = neutral,PublicKeyToken = 407dd0808d44fbdc'或其依赖项之一.定位的程序集的清单定义与程序集引用不匹配.(HRESULT异常:0x80131040)

我的解决方案有许多项目,尽可能使用项目引用,但其中一些项目具有对外部依赖项的程序集引用.

如何轻松找出正在寻找此特定版本的项目Castle.Windsor.dll?我没有那个版本,我试图使用2.5.2(最新),所以我想找到罪魁祸首并更新它以使用最新版本.

提前谢谢了.

更新
我在下面添加了一个已清理的Fusion日志.它似乎告诉我Caliburn.Castle需求Castle.Windsor, Version=2.1.0.0(这将是一个错误,因为我使用2.5),但Fusion组装探测实际上找到了Castle.Windsor, Version=2.5.1.0.

我理解正确吗?

=== Pre-bind state information ===
LOG: User = Barney\neil
LOG: DisplayName = Castle.Windsor, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc
 (Fully-specified)
LOG: Appbase = file:///[Debug folder of my exe]
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = [Filename of my exe]
Calling assembly : Caliburn.Castle, Version=1.1.0.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: [Config file for my exe]
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Castle.Windsor, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///[Debug folder of my exe]/Castle.Windsor.DLL.
LOG: Assembly download was successful. Attempting setup of file: [Debug folder of my exe]\Castle.Windsor.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Castle.Windsor, Version=2.5.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Run Code Online (Sandbox Code Playgroud)

Dar*_*rov 9

您可以使用Fuslogvw.exe实用程序,它将为您提供有关调用程序集的更多信息.Scott Hansleman也在博客上发表过这篇文章.