2

My first question here because I'm usually pretty nifty with searching for my own answers, I've been on this for a few hours now and I'm stumped - thanks in advance!

After following many directions across SO and other sources for things like

  • clean, rebuild
  • de-reference, clean, re-reference, clean, rebuild

The located assembly's manifest definition does not match the assembly reference

HRESULT: 0x80131040: The located assembly's manifest definition does not match the assembly reference

My project is still crashing on debug with exception:

Could not load file or assembly 'Blah.Blah.Common, Version=1.1.1.0, Culture=neutral, PublicKeyToken=2814cfce0563e70d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Exception occurs on the first call to retrieve an entity:

Dim so As SomeObject = db.SomeObject.First

Recently, I have had to rebuild the DLL with the signing removed and also incremented the build version to 1.2.0.0, so it makes no sense why that version would be called.

I've dug through the solution many times trying to find the mis-matched referencing without success.

Looking into the Fusion logs on error using the below instruction link, I found the calling assembly to be Entity Framework as below:

https://blogs.msdn.microsoft.com/junfeng/2004/02/14/fusion-binding-log-and-fuslogvw-exe/

    *** Assembly Binder Log Entry  (6/06/2018 @ 10:19:42 PM) ***

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

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  D:\Users\me\source\Workspaces\some_application\bin\Debug\some_application.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: DisplayName = Blah.Blah.Common, Version=1.1.1.0, Culture=neutral, PublicKeyToken=2814cfce0563e70d
 (Fully-specified)
LOG: Appbase = file:///D:/Users/me/source/Workspaces/some_application/bin/Debug/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = some_application.exe
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: D:\Users\me\source\Workspaces\some_application\bin\Debug\some_application.exe.config
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: Blah.Blah.Common, Version=1.1.1.0, Culture=neutral, PublicKeyToken=2814cfce0563e70d
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///D:/Users/me/source/Workspaces/some_application/bin/Debug/Blah.Blah.Common.DLL.
LOG: Assembly download was successful. Attempting setup of file: D:\Users\me\source\Workspaces\some_application\bin\Debug\Blah.Blah.Common.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Blah.Blah.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
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.ted.

How is EntityFramework tied to the old reference of my DLL?

EDIT: Added AsmSpy output below, all references appear to be in order as the errored ones have binding re-directs in the app.config.

Detailing only conflicting assembly references.
Reference: Microsoft.CSharp
  Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: Microsoft.Owin
  Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Source: NotFound
    2.1.0.0 by Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
  Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Source: Local, Location: D:\Users\jai.eldridge\source\Workspaces\PSA Business Group\PSA-Platform\PSA.Platform\PSA.Platform.WIndows.OutboundBridge.Console\bin\Debug\Microsoft.Owin.dll
    3.1.0.0 by Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    3.1.0.0 by Microsoft.Owin.Security.Cookies, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    3.1.0.0 by Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    3.1.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null

Reference: Microsoft.Owin.Security
  Microsoft.Owin.Security, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Source: NotFound
    2.1.0.0 by Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
  Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Source: Local, Location: D:\Users\jai.eldridge\source\Workspaces\PSA Business Group\PSA-Platform\PSA.Platform\PSA.Platform.WIndows.OutboundBridge.Console\bin\Debug\Microsoft.Owin.Security.dll
    3.1.0.0 by Microsoft.Owin.Security.Cookies, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    3.1.0.0 by Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    3.1.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null

Reference: Microsoft.Owin.Security.Cookies
  Microsoft.Owin.Security.Cookies, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Source: NotFound
    2.1.0.0 by Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
  Microsoft.Owin.Security.Cookies, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Source: Local, Location: D:\Users\jai.eldridge\source\Workspaces\PSA Business Group\PSA-Platform\PSA.Platform\PSA.Platform.WIndows.OutboundBridge.Console\bin\Debug\Microsoft.Owin.Security.Cookies.dll

Reference: Microsoft.Owin.Security.OAuth
  Microsoft.Owin.Security.OAuth, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Source: NotFound
    2.1.0.0 by Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
  Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Source: Local, Location: D:\Users\jai.eldridge\source\Workspaces\PSA Business Group\PSA-Platform\PSA.Platform\PSA.Platform.WIndows.OutboundBridge.Console\bin\Debug\Microsoft.Owin.Security.OAuth.dll

Reference: Microsoft.VisualBasic
  Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll
    10.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
    10.0.0.0 by PSA.Platform.Windows.OutboundBridge.Console, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

Reference: mscorlib
  mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll
    2.0.0.0 by CargoWise.eHub.Adapter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
    2.0.0.0 by CargoWise.eHub.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
  mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a
    4.0.0.0 by Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.AspNet.Identity.EntityFramework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin.Security.Cookies, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
    4.0.0.0 by Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
    4.0.0.0 by PSA.Platform.Windows.OutboundBridge.Console, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: Newtonsoft.Json
  Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
Source: NotFound
    6.0.0.0 by Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
  Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
Source: Local, Location: D:\Users\jai.eldridge\source\Workspaces\PSA Business Group\PSA-Platform\PSA.Platform\PSA.Platform.WIndows.OutboundBridge.Console\bin\Debug\Newtonsoft.Json.dll

Reference: System
  System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll
    2.0.0.0 by CargoWise.eHub.Adapter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
    2.0.0.0 by CargoWise.eHub.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
  System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a
    4.0.0.0 by Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.AspNet.Identity.EntityFramework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin.Security.Cookies, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
    4.0.0.0 by PSA.Platform.Windows.OutboundBridge.Console, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.ComponentModel.DataAnnotations
  System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.Configuration
  System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a
    4.0.0.0 by Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.Core
  System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll
    3.5.0.0 by CargoWise.eHub.Adapter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
    3.5.0.0 by CargoWise.eHub.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
  System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a
    4.0.0.0 by Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.AspNet.Identity.EntityFramework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Owin.Security.Cookies, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.Data
  System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a
    4.0.0.0 by Microsoft.AspNet.Identity.EntityFramework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null

Reference: System.Data.Entity
  System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Entity.dll
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.Data.Linq
  System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Linq.dll
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.Drawing
  System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.IdentityModel
  System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll
    4.0.0.0 by Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null

Reference: System.Numerics
  System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll
    4.0.0.0 by Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed

Reference: System.Runtime.Caching
  System.Runtime.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Caching\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Caching.dll
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.Runtime.Serialization
  System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll
    3.0.0.0 by CargoWise.eHub.Adapter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
    3.0.0.0 by CargoWise.eHub.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
  System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by Microsoft.Owin.Security.Cookies, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null

Reference: System.Security
  System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll
    4.0.0.0 by Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.ServiceModel
  System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll
    3.0.0.0 by CargoWise.eHub.Adapter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
    3.0.0.0 by CargoWise.eHub.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
  System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null

Reference: System.Transactions
  System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Reference: System.Web
  System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll
    4.0.0.0 by log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a
    4.0.0.0 by Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    4.0.0.0 by System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.Web.Extensions
  System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.Xml
  System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll
    2.0.0.0 by CargoWise.eHub.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f570df270576350
  System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a
    4.0.0.0 by Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
    4.0.0.0 by PSA.Platform.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
    4.0.0.0 by System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Reference: System.Xml.Linq
  System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source: GlobalAssemblyCache, Location: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll
    4.0.0.0 by EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    4.0.0.0 by Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
    4.0.0.0 by System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
  • _"How is EntityFramework tied to the old reference of my DLL"_ - Cleaning a project doesn't always remove old references. Have you tried deleting all the `\bin` directiories? – stuartd Jun 06 '18 at 13:04
  • What is your project structure like? Is Blah.Blah.Common referenced as a 'Project' or direct 'dll'? Have you tried deleting all `**\bin\ ` + `**\obj\ ` folders? My assumption would be that the project that declares the `DbContext` + Entities, is referencing the old assembly. – Michal Ciechan Jun 06 '18 at 13:38
  • Also try run https://github.com/mikehadlow/AsmSpy against your bin output, to see all mis-matched references – Michal Ciechan Jun 06 '18 at 13:40
  • I've tried removing \bin & \obj directories, even to the point of trashing the whole solution and starting over from a known working backup. Common is referenced as a project to the console application. Common holds the ApplicationDbContext and entities, Console is basically a timer loop to call a method in Common at an interval and Common does the work - accessing the DB and executing business logic – Jai Eldridge Jun 07 '18 at 02:29

1 Answers1

0

I ended up re-building the entire Common DLL project from scratch (as "Shared"), copying over the files, adding all the files back into the project via "Add Existing Item", installing the up-to-date versions of all nuGet packages to "Shared", de-referencing "Common" and referencing "Shared" in the console application, cleaning up the solution including removing ./bin and ./obj directories, re-compiling and testing - all ok with no compile or run-time errors.

I cannot for the life of me figure out where the bad referencing is for the Entity Framework to be looking for the wrong version of Blah.Blah.Common, but a clean slate appears to have resolved it.