Efcore: Scaffold-DbContext not producing output

Created on 4 Dec 2017  路  2Comments  路  Source: dotnet/efcore

using VS2017v15.4.5, with an empty .NET core 2.0 class library,

added Microsoft.EntityFrameworkCore.SqlServer (2.0.1), Microsoft.EntityFrameworkCore.Tools (2.0.1) through Nuget

running command Scaffold-DbContext "Server=XXX;Database=YYY;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models

from tutorial on Reverse Engineering DB https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db

Scaffold-DbContext does not report any errors, but does not produce any models, dbcontext classes. No exceptions are shown

closed-duplicate

Most helpful comment

Looks like you're hitting #10298. Add the following to your *.csproj:

<PropertyGroup>
  <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>

All 2 comments

I could not reproduce.

Which packages did you install?

Is Microsoft.EntityFrameworkCore.Tools really installed?

Looks like you're hitting #10298. Add the following to your *.csproj:

<PropertyGroup>
  <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
Was this page helpful?
0 / 5 - 0 ratings