I have 2 projects in my solution, I have a project with Entity Framework Core installed:
And in the other ASP.NET Web API project I have these packages:
Set the project with entities as the Startup project and run the scaffolding command. it worked for me. Don't forget to set the revert the startup project after.