简体   繁体   English

指定的架构无效-异常

[英]Schema specified is not valid - Exception

Schema specified is not valid. 指定的架构无效。 Errors: (0,0) : error 0004: Could not load file or assembly 'JIMSDAL, Version=6.0.5126.47, Culture=neutral, PublicKeyToken=9054b539c49e6e2e' or one of its dependencies. 错误:(0,0):错误0004:无法加载文件或程序集“ JIMSDAL,版本= 6.0.5126.47,区域性=中性,PublicKeyToken = 9054b539c49e6e2e”或其依赖项之一。 The located assembly's manifest definition does not match the assembly reference. 找到的程序集的清单定义与程序集引用不匹配。 (Exception from HRESULT: 0x80131040) (来自HRESULT的异常:0x80131040)

Why I get this exception, I checked every dependent project of JIMSDAL and they are referencing the correct updated version 6.0.1.0. 为什么得到此异常,我检查了JIMSDAL的每个相关项目,它们都引用了正确的更新版本6.0.1.0。

I also checked with fuslogvw.exe and its not helping. 我还检查了fuslogvw.exe ,它没有帮助。 It says 它说

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.

There is no config file with this version too. 此版本也没有配置文件。 I even removed the reference of this project and re added. 我什至删除了该项目的参考,然后重新添加。 But nothing works. 但是没有任何效果。 Where am I going wrong? 我要去哪里错了?

That's not much to go by but the FSLogVw output shows the calling assembly to be EF. 没什么大不了的,但是FSLogVw输出显示调用程序集为EF。 Are you using and edmx? 您正在使用和edmx吗? If so, you may want to open it in XML view (not design view) and see if there are references to your assembly in there. 如果是这样,您可能要在XML视图(而不是设计视图)中打开它,然后查看其中是否存在对程序集的引用。 You mentioned you've already checked the .config file, so that rules that out. 您提到您已经检查了.config文件,因此可以将其排除在外。

You are referencing JIMSDAL, Version=6.0.5126.47 , but the calling assembly found JIMSDAL, Version=6.0.0.0 . 您正在引用JIMSDAL, Version=6.0.5126.47 ,但是调用程序集找到了JIMSDAL, Version=6.0.0.0 I've had this happen in the past when mixing project references with references to a compiled assembly, but there are other ways it can happen. 过去,在将项目引用与对已编译程序集的引用进行混合时,我曾发生过这种情况,但是还有其他可能发生的方法。 Look for multiple references to JIMSDAL, and make sure they are all pointing to the same thing. 查找对JIMSDAL的多个引用,并确保它们都指向同一事物。

This question (https://stackoverflow.com/questions/5600904/net-dll-dependency-of-same-file) describes a similar problem, you might want to take a look. 这个问题(https://stackoverflow.com/questions/5600904/net-dll-dependency-of-same-file)描述了类似的问题,您可能想看看。

And here's another question with some helpful suggestions: Project References DLL version hell 这是另一个带有一些有用建议的问题: 项目参考DLL版本hell

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM