Reputation: 104
For some reason I'm getting this error. Below are the specs and then what I did.
Visual Studio 2017 v15.6.2
SQL Server 2008 v10.50.4
I opened the package manager console and added the following packages...
Install-Package Microsoft.EntityFrameworkCore.SqlServer
Install-Package Microsoft.EntityFrameworkCore.Tools
and then I ran
Scaffold-DbContext "Server=ph2srv76;Database=AVDRS;Integrated Security=True;Trusted_Connection=True;" -Provider Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -force
but during the build I get the following errors...
Upvotes: 4
Views: 6499
Reputation: 3893
In my case, I used -table option. I got the same error when I do this:
-Tables "REPORT, REPORT_TYPE, SAVED_REPORT"
The correct way is this:
-Tables "REPORT", "REPORT_TYPE", "SAVED_REPORT"
Upvotes: 0
Reputation: 155
I hate to post the obvious, but in my case (same error) I was targeting specific tables to model (with -t option) and didn't realize that the table names are case sensitive. Doh!
Upvotes: 9
Reputation: 528
In case anyone else gets this I solved it by checking and fixing the following:
After the above the scaffold worked for me!
Upvotes: 2
Reputation: 41809
Those are just warnings (yellow), not errors(red) - you can safely ignore them
Upvotes: 2