1

指定的架构无效。错误:(0,0):错误 0004:无法加载文件或程序集“JIMSDAL,版本=6.0.5126.47,文化=中性,PublicKeyToken=9054b539c49e6e2e”或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。(来自 HRESULT 的异常:0x80131040)

为什么我得到这个异常,我检查了 JIMSDAL 的每个依赖项目,它们引用了正确的更新版本 6.0.1.0。

我也检查了fuslogvw.exe它并没有帮助。它说

The operation failed.
Bind result: hr = 0x80131040. No description available.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  X:\yyyyy\Build\Debug\JIMS.vshost.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: DisplayName = JIMSDAL, Version=6.0.5126.47, Culture=neutral, PublicKeyToken=9054b539c49e6e2e
 (Fully-specified)
LOG: Appbase = file:///X:/yyyyy/Build/Debug/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
    Calling assembly : EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: X:\yyyyy\Build\Debug\JIMS.vshost.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: JIMSDAL, Version=6.0.5126.47, Culture=neutral, PublicKeyToken=9054b539c49e6e2e
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///X:/yyyyy/Build/Debug/JIMSDAL.DLL.
LOG: Assembly download was successful. Attempting setup of file: X:\yyyyy\Build\Debug\JIMSDAL.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: JIMSDAL, Version=6.0.0.0, Culture=neutral, PublicKeyToken=9054b539c49e6e2e
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
ERR: The assembly reference did not match the assembly definition found.
ERR: Run-from-source setup phase failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

这个版本也没有配置文件。我什至删除了这个项目的引用并重新添加。但没有任何效果。我哪里错了?

4

2 回答 2

0

您正在引用JIMSDAL, Version=6.0.5126.47,但找到调用程序集JIMSDAL, Version=6.0.0.0。我过去在将项目引用与对已编译程序集的引用混合时发生过这种情况,但还有其他可能发生的方式。查找对 JIMSDAL 的多个引用,并确保它们都指向同一事物。

这个问题(https://stackoverflow.com/questions/5600904/net-dll-dependency-of-same-file)描述了一个类似的问题,你可能想看看。

这是另一个问题,提供了一些有用的建议:项目引用 DLL 版本地狱

于 2014-01-14T19:50:28.373 回答
0

这没什么可做的,但 FSLogVw 输出显示调用程序集是 EF。你在用 edmx 吗?如果是这样,您可能希望在 XML 视图(而不是设计视图)中打开它,并查看其中是否有对您的程序集的引用。您提到您已经检查了 .config 文件,因此排除了这种情况。

于 2014-01-13T21:27:45.450 回答