I have a dotnet core class library. And after adding Microsoft.EntityFrameworkCore.SqlServer
package to project, this Analyzers
warning showed up:
I have only one single simple entity and a DbContext
in project and nothing more. Do you have any idea what is the error about and how to fix it?
I'm using VS 2017 Version 15.8.8
, .NET Core 2.1
and EF Core 2.1.4
.
I went to that location C:\Users\User.nuget .. etc and deleted the package. I closed visual studio and reopened it. The package was restored and the error was gone. I was using a .net framework application in visual studio at the same time and was opening and closing the core solution repeatedly so I'm thinking the package got corrupted somehow.
Just unload the project and reload it again, the warning is disappeared. The source
UPDATE for Visual Studio 2019:
If you use Visual Studio 2019 you have always to get last version. So if there are any updates available just install it.
Click on Help => Check for Updates => Update.