Project is .NetCore 2.2 Nuget Packages: * Microsoft.EntityFrameworkCore.Design (2.2.0) * Microsoft.EntityFrameworkCore.Sqlite (2.2.0) * Microsoft.EntityFrameworkCore.Tools (2.2.0)
Running Command:
Scaffold-DbContext "Data Source=blogging.db;" Microsoft.EntityFrameworkCore.Sqlite -OutputDir Models
Produces Error:
Unable to find provider assembly with name Microsoft.EntityFrameworkCore.SqlLite. Ensure the specified name is correct and is referenced by the project.
I was getting this error:
Unable to find provider assembly with name Microsoft.EntityFrameworkCore.SqlServer. Ensure the specified name is correct and is referenced by the project.
I fixed it by adding this to the <ItemGroup> element in the project file.
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.5" />
The fix as mentioned was to add the SQL framework. You can add it very quickly via the package manager console using:
Install-Package Microsoft.EntityFrameworkCore.SqlServer
I solved this error by installing EntityFrameworkCore through nuget package manager. Also the project the EntityFrameworkCore packages installed, should be referred in the project you try to create models.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With