efcore: Method not found: Microsoft.EntityFrameworkCore.SqlServerPropertyBuilderExtensions.UseSqlServerIdentityColumn

I have an existing ASP.NET Core 2.0 app. I am trying to upgrade EFCore from 2.0.3 to 3.1.1. Upon adding a migration, I get the error:

Method not found: Microsoft.EntityFrameworkCore.SqlServerPropertyBuilderExtensions.UseSqlServerIdentityColumn

I replaced all instances of .UseSqlServerIdentityColumn() with .UseIdentityColumn() and I still get the above error, when executing Package Manager Console command:

Add-Migration

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (12 by maintainers)

Most upvoted comments

@ajcvickers In the original issue, I got “Method not found: Microsoft.EntityFrameworkCore.SqlServerPropertyBuilderExtensions.UseSqlServerIdentityColumn”. while trying to update a Net Core 2.0 app to 3.1.1. I experienced other issues as well and rolled back the changes. I created a new project, from scratch, with a Net Core 3.1.1 template, because it may be easier to create a new project, rather than update the existing packages. The new, 3.1.1, project gave me the errors regarding remapping Identity tables. Originally, I reported the Identity problem, under Net Core 2.1. https://github.com/dotnet/aspnetcore/issues/5824 Simply replacing my existing project with a new one may be the easier option; however, whether I update the existing project or create a new project, Identity table mapping has not worked since 2.0. The solution that I attached is a bare bones project that illustrates the Identity problem.