簡體   English   中英

指定的架構無效-異常

[英]Schema specified is not valid - Exception

指定的架構無效。 錯誤:(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.

此版本也沒有配置文件。 我什至刪除了該項目的參考,然后重新添加。 但是沒有任何效果。 我要去哪里錯了?

沒什么大不了的,但是FSLogVw輸出顯示調用程序集為EF。 您正在使用和edmx嗎? 如果是這樣,您可能要在XML視圖(而不是設計視圖)中打開它,然后查看其中是否存在對程序集的引用。 您提到您已經檢查了.config文件,因此可以將其排除在外。

您正在引用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版本hell

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM