Scaffolding: Scaffolding fails if model class is in a dependency (project/ library) of the project on which scaffolding is being run.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 35 (7 by maintainers)
Commits related to this issue
- Look for model type in dependencies if its not found in the project directly. Fixes #251 — committed to dotnet/Scaffolding by prafullbhosale 8 years ago
- Look for model type in dependencies if its not found in the project directly. Fixes #251 — committed to dotnet/Scaffolding by prafullbhosale 8 years ago
- Look for model type in dependencies if its not found in the project directly. Fixes #251 — committed to dotnet/Scaffolding by prafullbhosale 8 years ago
- Look for model type in dependencies if its not found in the project directly. Fixes #251 — committed to dotnet/Scaffolding by prafullbhosale 8 years ago
- Look for model type in dependencies if its not found in the project directly. Fixes #251 — committed to dotnet/Scaffolding by prafullbhosale 8 years ago
- Look for model type in dependencies if its not found in the project directly. Fixes #251 — committed to dotnet/Scaffolding by prafullbhosale 8 years ago

Still, exists.
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.
i am using v1.1.0 and this issue is still there
Still exists
Thanks a lot @prafullbhosale it works like a charm π π . So what I get is that the main project is not have enough permissions to edit the files of other class libraries or something like that. Is this correct?
@RupeshY, this issue is fixed in the Dev branch.