I\'m using VS 2013 RTM Ultimate, and when I try to add a Controller to my MVC 5 project I get the following error:
\"There was an error running the selected code generat
In case you do NOT have MVCScaffolding or T4Scaffolding packages installed and you encounter this bug/problem, check my solution here:
Scaffolding controller doesn't work with visual studio 2013 update 2
To sum up: the problem can be caused by the connection string. In my case I used localdb, I switched to a connection string to a standard sql server, then tried to generate the controller with MVC views and it worked.
I tried to switch back the connection string to localdb, it didn't work. So that must have been the problem...