Ivo Coumans
Ivo Coumans

Reputation: 759

Upgrading AspNet.Identity.EntityFramework to 2.1.0 and EntityFramework to 6.1.1

I'm working on two projects with the same SQL Server database. One has been created using ASP.NET Framework 4.5, Entity Framework 6.0.0 and AspNet.Identity.EntityFramework 1.0.0. It's working fine and has no issues. The newer project has been created using ASP.NET Framework 4.5.1, Entity Framework 6.1.1 and Identity 2.1.0, and it keeps throwing an error saying:

The model backing the 'ApplicationDbContext' context has changed since the database was created.

After some searching, I found an answer saying that I need to reference the same version of EF in both projects. When I upgraded my older project, both projects got the error. When I downgraded my newer project, the error went away.

I'm not sure if I absolutely need the newer version (probably not), but I'd like to know how I would go about upgrading, for future reference.

Upvotes: 1

Views: 318

Answers (1)

tmg
tmg

Reputation: 20393

The error also says to "consider using code first migrations to update the database"? Installing Identity 2.1.0, you changed the model so you need to update the database. Maybe this will help http://jskiles1.wordpress.com/2014/04/20/upgrading-an-existing-project-from-asp-net-identity-1-0-to-2-0/

Upvotes: 2

Related Questions