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.

Scaffolding fails if model class is in a dependency (project/ library) of the project on which scaffolding is being run.

See original GitHub issue

Project A has a dependeny on Project B. Project B has model class If you try to run scaffolding on Project A by using model class from Project B, it fails with the below error: No model type returned for type: <class name>

image

Related #249 #140

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:35 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
basilaimancommented, Nov 1, 2017

Still, exists.

3reactions
prafullbhosalecommented, Dec 21, 2016

Thanks @Vikaskumargd, The problem is with the DbContext being in the library, not the model classes. The DbContext in libraries isn’t supported fully because editing it is not possible, however, it is possible to make it work if no edits are needed. I have filed https://github.com/aspnet/Scaffolding/issues/365 to enable this scenario. As a workaround for now, you can try to move the DbContext to the main project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scaffolding fails if model class is in a dependency (project ...
Scaffolding fails if model class is in a dependency (project/ library) of the project on which scaffolding is being run. #251.
Read more >
multiple types matching the name while Scaffolding ASP. ...
Scaffolding fails if model class is in a dependency (project/ library) of the project on which scaffolding is being run. #251.
Read more >
Scaffolding Error when Model and DbContext are in ...
4.1 and entity framework core 2.0 fails when my model and data classes are in separate class libraries. I have a Portal MVC...
Read more >
Fix Update: Scaffolding failed, could not load information for ...
Fix Update: Scaffolding failed, could not load information for project | Visual Studio | Updated. 5.3K views · 10 months ago ...more ...
Read more >
.NET Identity Scaffolding Error - YouTube
NET Identity Class Library for Authentication. ... (in cases when you have multiple project and references as seen here .
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