Entity Framework Core 2.0 Scaffold-DbContext returns Build Error

.net core entity-framework-core

Question

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.

  1. Microsoft.EntityFrameworkCore.SqlServer

  2. Microsoft.EntityFrameworkCore.SqlServer.Design

  3. Microsoft.EntityFrameworkCore.Tools

  4. Microsoft.VisualStudio.Web.CodeGeneration.Design

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.

1
0
8/22/2017 8:04:28 AM

Popular Answer

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.

4
8/23/2017 8:00:56 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow