question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No EF Core DbContext types found in the project

See original GitHub issue

When I attempted to add a DbContext model diagram, I received the following error:

System.ArgumentException: No EF Core DbContext types found in the project
   at ReverseEngineer20.EfCoreModelBuilder.GetDbContextTypes(DbContextOperations operations) in C:\Code\EFCorePowerTools\src\GUI\efpt\EFCoreModelBuilder.cs:line 76
   at ReverseEngineer20.EfCoreModelBuilder.BuildResult(String outputPath, Boolean generateDdl) in C:\Code\EFCorePowerTools\src\GUI\efpt\EFCoreModelBuilder.cs:line 34
   at ReverseEngineer20.Program.Main(String[] args) in C:\Code\EFCorePowerTools\src\GUI\efpt\Program.cs:line 44

Parameter name: processResult
   at EFCorePowerTools.Handlers.ModelAnalyzerHandler.Generate(String outputPath, Project project, GenerationType generationType) in C:\projects\efcorepowertools\src\GUI\EFCorePowerTools\Handlers\ModelAnalyzerHandler.cs:line 49

The same error occurred when executing any of the other DbContext related commands in EF Core Power Tools, even though a DbContext does indeed exist in the project.

Further technical details

EF Core Power Tools version: 1.0.617

Database engine: SQL Server

Visual Studio version: Visual Studio 2017 15.7.4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
The-DevOps-Guycommented, Dec 12, 2018

Hi, facing the same issue within .Net core 2.2 Projects Do you have an eta on a repackage ? Thanks.

1reaction
ErikEJcommented, Jun 19, 2018

It is because I do not support 2.1.1 (yet) !!! Change to 2.1.0 and it will work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EF Core Error - No project was found. Change the current ...
ef code first - EF Core Error - No project was found. Change the current working directory or use the --project option -...
Read more >
Fix : No DbContext was found in assembly | ASP.NET CORE
In this video, i am going to show you, how to resolve that type of error like No DbContext was found in assembly....
Read more >
Scaffolding (Reverse Engineering) - EF Core
Reverse engineering is the process of scaffolding entity type classes and a DbContext class based on a database schema. It can be performed ......
Read more >
EF Core Power Tools
Migrations Tool - Manage EF Core Migrations in the project: View status, Add Migration, Update Database Add DbContext Model Diagram - Adds a...
Read more >
Using EF Core - Power Tools In ASP.NET Core API
In this article, we will learn how to integrate EF Core power tools and its usage to generate POCO Classes in Core API....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found