When I have first-chance exceptions
enabled in VS2010
, I get the following message the first time I call EntityFramework's
SaveChanges()
. This is a WinForms
application running a MSSQL CE 4
database.
BindingFailure The assembly with display name 'Microsoft.SqlServer.Types' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
After continuing, this message is also displayed:
FileLoadException Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I've included the Microsoft.SqlServer.Types.dll
in the project.
I know this is a first-chance exception and it doesn't seem to affect the application outside of the notice when I debug, but I'd like to fix it anyways. (It's bugging me in the back of my mind.)
First, what is this error message trying to tell me?
Second, how do I fix it?