Scaffold-DbContext throws error "Could not find assembly" in .net core

.net .net-core c# entity-framework-core scaffolding

Popular Answer

Although I'm not sure whether this is a bug,scaffold-dbcontext command searches the first project for the assembly.

There are two solutions to this problem.

  1. To execute this command, right-click the project you want to use (in your example, MyProject.Data) and choose Establish as a new project.
  2. You may include a switch inscaffold-DBContext command to make a certain project the startup project while the command is executing. You must include this at the end of the command.

    -StartupProject MyProject.Data

7
8/29/2018 12:04:29 AM






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