Using VS2017 Preview 3, .NET Core 2 (PREVIEW) I had all sorts of issues, but eventually I took the approach suggested above and created a brand new solution.
- Created new .NET Core solution
- Edited project file and changed 1.0 to 2.0:
netcoreapp2.0
- Closed/re-opened solution
Then, added the Entity Framework:
- In PackageManager console:
- Install-package Microsoft.EntityFrameworkCore.SqlServer -Version 2.0.0-preview2-final
- Install-package Microsoft.EntityFrameworkCore.Tools -Version 2.0.0-preview2-final
- Install-package Microsoft.EntityFrameworkCore.Design -Version 2.0.0-preview2-final
- Edited project file, and added:
Then;
- Opened the Powershell command prompt and changed directory into Scaffold
project folder
- Ran: dotnet ef dbcontext scaffold
"Server=DESKTOP-MB70B7U; Database=ForexForme;
Trusted_Connection=True" Microsoft.EntityFrameworkCore.SqlServer -o
Models
- Where you put in your own connection string!
- Models is the name of my directory where I put all my classes