Home
Options

"The model backing the UserQuery context has changed" error

Even though the model has not changed. This happened in the middle of the work day yesterday, possibly after rebooting my PC but I'm not sure. I have a DbContext connection that uses a "Path to Custom Assembly" and selects a context from that assembly. Path to application config file is set.

When running something as simple as ctx.Database.Connection.ConnectionString.Dump(), I get the above error. I know this implies a mismatch between the model and the database pointed to in app.config, but neither has changed in many weeks.

When I try to create a new connection (DbContext), something else happens. When I select the path to my custom assembly, I get a pop-up error message "Could not load file or assembly 'EntityFramework, Version=6.0.0.0..." All projects have referenced EF6 for many years, though I did recently introduce a new project that references EF Core. When I try to create a new connection using the custom assembly to that EF Core project, I don't get an error message about EF 6, but when I click on the "choose" link for Full Type Name of Typed DbContext I instead get a pop-up error stating "Could not load file or assembly 'System.Runtime, Version=4.2.1.0..."
Sign In or Register to comment.