I have been given a DLL which is supposed to contain the set of model classes.
I have been asked to generate controllers and view from this dll in visual studio 2013.
So, I created a new MVC5 project and added a reference of the given dll.
Further, To Test access to these model classes, I added a new class file and included namespace classlibrary.modal that was specified.
I was able to see all the model classes and their properties and method in this class file.
So, I went for generating the controllers and views by using Add scaffold option of "MVC 5, Controllers with Views Using entity framework".
But in the [model class] dropdown of add controller dialog.
I could not see any class of the given dll.
However, I could see the classes present in the current solution.
What should I do to make given dll classes to appear in the model dropdown list.
Kindly guide me.
Thanks in Advance


Rajeev PunhaniRank #551 · 4.4K reputationPosted Mar 15, 2017, 10:09 PM EDT
Hi Kartik,
Scaffolding a controller from a model in a regular reference (unlike a project reference) is not supported in MVC5 scaffolding.Just add the class library project to same solution and add reference to the project it works fine adding the class library as a project reference rather than a regular reference should solve your problem
Please see the below link for reference.
Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 15, 2017, 5:45 AM EDT
Karthik ElumalaiRank #544 · 4.5K reputationPosted Mar 15, 2017, 8:00 AM EDT
Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 15, 2017, 8:09 AM EDT
Karthik ElumalaiRank #544 · 4.5K reputationPosted Mar 16, 2017, 10:31 PM EDT