Schema specified is not valid - Exception

675 views Asked by At

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. The located assembly's manifest definition does not match the assembly reference. (Exception from 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.

I also checked with fuslogvw.exe and its not helping. 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?

2

There are 2 answers

0
Matt On

You are referencing JIMSDAL, Version=6.0.5126.47, but the calling assembly found 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.

This question (https://stackoverflow.com/questions/5600904/net-dll-dependency-of-same-file) describes a similar problem, you might want to take a look.

And here's another question with some helpful suggestions: Project References DLL version hell

1
Carlos On

That's not much to go by but the FSLogVw output shows the calling assembly to be EF. Are you using and 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. You mentioned you've already checked the .config file, so that rules that out.