Question

I have a dotnet core class library. And after adding Microsoft.EntityFrameworkCore.SqlServer package to project, this Analyzers warning showed up:

EF1000: Possible SQL injection vulnerability.

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.

1
0
11/15/2018 12:22:53 PM

Accepted Answer

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.

22
9/27/2018 3:48:48 AM

Popular Answer

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.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow