I have used MVC for a few projects. I make a viewmodel for every view. For example I transform my user object to a special viewmodel with an email a password and a password again property. I use dataannotations on the viewmodel for validation.
Usually the scaffolding works fine in these cases. On a simple project I select Add View, select my viewmodel for scaffolding, select the Edit scaffold template for example, click ok and BAM, there is my view.
But in the case I'm not able to select my viewmodel for scaffolding. No classes from the namespace ViewModels are showing up. How could this happen?
What is showing up for scaffolding on that dialog?
Scaffolding is a powerful tool and I wouldn't want to lose it.
EDIT: cleaning and rebuilding the code doesn't help.
I also had this problem with 2 projects although a fix for one did not fix the other so this may or may not be helpful.
I effectively performed my own uber clean by deleting the entire obj and bin folders of each project and re-building
As I say this only worked for one of the 2 projects. The other I manually had to create the controllers and views.
I think this problem may have something to do with a recent mvc update but on searching around there was very little help