ASP.NET 5 and MVC 6 Add View/Controller
|Added at||2016-01-13 17:01|
I have created a Web Project with VS2015's template for ASP.NET5. I have also disabled the Authentication. Now I was wondering, why I wasn't able to have a view being created automatically by VS. So I found out, that adding "Microsoft.Extensions.CodeGenerators.Mvc" to the project.json's dependency list with the appropriate version number did the trick to at least be able to add an auto-generated view for a specific Model and DataContext by right-clicking the "Views"-Folder.
But I couldn't get it working to be able to do it also by right-clicking a "return View(someViewModel)" as it is possible to do with ASP.NET 4.6.1 for example. I already did a lot of research as it was always a handy function to create a view that easy.
EDIT: I found, that by going to Tools -> Customize -> Commands, selecting Context menu and then "Editor Context Menus | Code Window" from the dropdown, that there is th Add View option, I just don't get it now, how to enable it when being in a controller for example