When I upgraded to Entity Framework core 2.1, I got the below warning each time I try to build the application
CSC : warning CS8032: An instance of analyzer Microsoft.EntityFrameworkCore.RawSqlStringInjectionDiagnosticAnalyzer cannot be created from C:\Users\Mohamed.Shousha\.nuget\packages\microsoft.entityframeworkcore.analyzers\2.1.0\analyzers\dotnet\cs\Microsoft.EntityFrameworkCore.Analyzers.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=2.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..
.NET Command Line Tools (2.1.105)
Product Information:
Version: 2.1.105
Commit SHA-1 hash: 141cc8d976
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.105\
Microsoft .NET Core Shared Framework Host
Version : 2.0.7
Build : 2d61d0b043915bc948ebf98836fefe9ba942be11
EF Core version: 2.1.0
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Project .Net Core Version: 2.0
Operating system: Windows 10 Enterprise
IDE: Visual Studio 2017 15.5.2
Duplicate of #12222
Can you upgrade your VS to 15.7.3 & install .NET Core SDK 2.1.0 and see if the problem goes away?
@Moudybasha We believe that when using Visual Studio with EF Core 2.1 will require VS 15.7.3 to avoid this warning. Or you can live with the warning--there is no runtime functionality in the analyzer package.
Most helpful comment
@Moudybasha We believe that when using Visual Studio with EF Core 2.1 will require VS 15.7.3 to avoid this warning. Or you can live with the warning--there is no runtime functionality in the analyzer package.