Entity Framework Core: DbContextOptionsBuilder does not contain a definition for 'usesqlserver' and no extension method 'usesqlserver'

前端 未结 30 3200
星月不相逢
星月不相逢 2020-12-13 03:14

I am new to EF core and I\'m trying to get it to work with my ASP.NET Core project.

I get the above error in my startup.cs when trying configure the

30条回答
  •  暖寄归人
    2020-12-13 03:31

    In Visual Studio, check the NuGet Package Manager => Manage Packages for Solution, check all this packages, whether got installed in your solution or not, as below:

    1. EntityFrameworkCore
    2. Microsoft.EntityFrameworkCore
    3. Microsoft.EntityFrameworkCore.InMemory
    4. Microsoft.EntityFrameworkCore.Relational
    5. Microsoft.EntityFrameworkCore.Sqlite.Core
    6. Microsoft.EntityFrameworkCore.SqlServer
    7. Microsoft.EntityFrameworkCore.Tools

    I solved the same issues after check all the above packages have been installed.

提交回复
热议问题