In my case this error was caused by the existence of the _MigrationsHistory table in the database. Deleting that table fixed the problem. Not sure how that table got into our test environment database.
More Related Contents:
- One DbContext per request in ASP.NET MVC (without IOC container)
- Why LINQ to Entities does not recognize the method ‘System.String ToString()?
- Multiple DB Contexts in the Same DB and Application in EF 6 and Code First Migrations
- using stored procedure in entity framework
- Should services always return DTOs, or can they also return domain models?
- ASP.NET MVC3 and Entity Framework Code first architecture
- How to change type of id in Microsoft.AspNet.Identity.EntityFramework.IdentityUser
- Saving Many to Many relationship data on MVC Create view
- Defining multiple Foreign Key for the Same table in Entity Framework Code First
- ‘Microsoft.SqlServer.Types’ version 10 or higher could not be found on Azure
- Converting flattened hierarchical data from SQL Server into a structured JSON object with C#/Linq
- Entity Framework Include OrderBy random generates duplicate data
- Use Entity framework I want to include only first children objects and not child of child(sub of sub)
- keyword not supported data source
- Incompatible Data Reader Exception From EF Mapped Objects
- There is already an object named ‘AspNetRoles’ in the database
- The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value
- The type or namespace name ‘DbContext’ could not be found [closed]
- EntityType ‘Category’ has no key defined. Define the key for this EntityType [duplicate]
- Strongly-Typed ASP.NET MVC with ADO.NET Entity Framework [closed]
- Including an anchor tag in an ASP.NET MVC Html.ActionLink
- MVC3 unobtrusive validation group of inputs
- MVC Razor @foreach
- Razor actionlink autogenerating ?length=7 in URL?
- How to remove ASP.Net MVC Default HTTP Headers?
- DataAnnotations validation (Regular Expression) in asp.net mvc 4 – razor view
- RenderAction RenderPartial
- Can I pass an anonymous type to my ASP.NET MVC view?
- Unable to Retrieve Metadata
- Export to Excel in Asp.net MVC [closed]