如何找到什么依赖于特定的依赖特定版本的? [英] How to find what depends on a specific version of a specific dependency?
问题描述
当我跑我的应用程序,我得到这个错误(而不是在编译时):
无法加载文件或程序集 Castle.Windsor,版本= 2.1.0.0, 文化=中立, 公钥= 407dd0808d44fbdc或 它的一个依赖。在位于 集清单定义呢 不匹配的程序集引用。 (从HRESULT异常:0x80131040)
我的解决方案有许多项目,使用项目引用在可能的情况,但其中的一些项目都装配引用外部的依赖关系。
我怎么能很容易地找出哪些项目正在寻求 Castle.Windsor.dll
的这个特定的版本?我没有那个版本,想使用2.5.2(最新的),所以我想找到的罪魁祸首,并更新它使用最新的一个。
在预先感谢。
更新
我添加了一个消毒融合日志下面。这似乎在告诉我, Caliburn.Castle
要求 Castle.Windsor,版本= 2.1.0.0
(这将是一个错误,因为我使用的是2.5),但融合的程序集探测作为真正找到 Castle.Windsor,版本= 2.5.1.0
代替。
我有没有正确地理解了?
=== pre-绑定状态信息===
日志:用户=巴尼\尼尔
日志:显示名称= Castle.Windsor,版本= 2.1.0.0,文化=中性公钥= 407dd0808d44fbdc
(完全限定)
日志:应用平台=文件:/// [调试我的exe文件的文件夹]
LOG:初始PrivatePath = NULL
日志:动基座= NULL
日志:缓存基地= NULL
LOG:AppName的= [我的exe文件的文件名]
调用汇编:Caliburn.Castle,版本= 1.1.0.0,文化=中性公钥= 8e5891231f2ed21f。
===
日志:此绑定从default加载上下文。
日志:正在使用应用程序配置文件:配置文件,我的EXE]
日志:使用主机配置文件:
日志:从C使用计算机配置文件:\ WINDOWS \ Microsoft.NET \框架\ v4.0.30319 \ CONFIG \ machine.config中。
日志:后政策参考:Castle.Windsor,版本= 2.1.0.0,文化=中性公钥= 407dd0808d44fbdc
日志:GAC查找不成功。
日志:新的URL文件试图下载:/// /Castle.Windsor.DLL [调试我的exe文件的文件夹。
日志:程序集下载成功。文件试图设置:[调试我的exe文件的文件夹] \ Castle.Windsor.dll
日志:进入运行从源代码安装阶段。
日志:大会名称为:Castle.Windsor,版本= 2.5.1.0,文化=中性公钥= 407dd0808d44fbdc
警告:比较程序集名称时发生不匹配:次版本
错误:程序集引用未找到该组件定义相匹配。
错误:未能完成安装的组件(HR = 0x80131040)。探测终止。
您可以使用 Fuslogvw.exe实用将提供您在调用程序集的详细信息。斯科特Hansleman也<一href="http://www.hanselman.com/blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx">blogged它的。
I'm getting this error when I run my app (not at compile time):
Could not load file or assembly 'Castle.Windsor, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
My solution has many projects, using project references where possible, but some of those projects have assembly references to external dependencies.
How can I easily find out which project is looking for this specific version of Castle.Windsor.dll
? I don't have that version and am trying to use 2.5.2 (latest), so I want to find the culprit and update it to use the latest one.
Many thanks in advance.
UPDATE
I've added a sanitised Fusion log below. It appears to be telling me that Caliburn.Castle
requires Castle.Windsor, Version=2.1.0.0
(which would be a mistake as I'm using 2.5), but Fusion assembly probing as actually finding Castle.Windsor, Version=2.5.1.0
instead.
Have I understood that correctly?
=== 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.
You could use the Fuslogvw.exe utility which will provide you more information on the calling assembly. Scott Hansleman also blogged about it.
这篇关于如何找到什么依赖于特定的依赖特定版本的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!