Scaffold-DbContext doesn't produce models

dbcontext entity-framework entity-framework-core model sql-server

Question

I am trying to run Scaffold-DbContext to generate some models from an old system. I am running the following command:

Scaffold-DbContext "Data Source=localhost\SQLEXPRESS;Initial Catalog=MAINT_TRAINING;Integrated Security=True" Microsoft.EntityFrameworkCore.SqlServer

The problem is that I get absolutely no output... No models, no errors, no confirmations...

The tables in the DB all have primary keys.

Am I doing something wrong?

1
2
12/7/2017 10:25:10 PM

Popular Answer

You may be hitting issue #10298. Try adding the following to your *.csproj:

<PropertyGroup>
  <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
2
12/8/2017 4:48:36 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