在运行我的应用程序时(不是在编译时),我收到了以下错误:
无法加载文件或程序集“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.