In Visual Studio 2017, create a .NET core class library project with Target Framework as 2.0.
Have included below packages by Package Manager console.
While running below Scaffold-DbContext command from Package Manager console of the same project, getting Build Failed error.
Scaffold-DbContext "Data Source=HTGHTFG135611L;Initial Catalog=HHH;Persist Security Info=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DBModels -force -v
Also tried giving UserId and password, still the same error.
I had the same problem today, please be sure any project in your solution does not fail to build. Examine output folder after you got this error. I think one of your projects in your solution fails to build.