How to scaffold EF core to existing DB?

I was getting the following error when trying to scaffold from an existing SQLite database:

Unable to find provider assembly with name Microsoft.EntityFramworkCore.Sqlite. Ensure the specified name is correct and is referenced by the project.

The project was in a solution with one other project. Even though the correct project was referenced in the Package Manager Console it only worked when I selected the 'Set as Startup Project' item on the project context menu.


Install fallowing NuGet package:

Install-Package Microsoft.EntityFrameworkCore.SqlServer