Can’t Add View from Controller in VS 2015 : “There was an error running the selected code generator”

Try clearing the ComponentModelCache, the cache will rebuild next time VS is launched. Close Visual Studio Delete everything in this folder C:\Users\ [your users name] \AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache Restart Visual Studio 14.0 is for visual studio 2015. This will work for other versions also.

What does aspnet_regiis.exe do

From MSDN reference: When multiple versions of the .NET Framework are executing side-by-side on a single computer, the ASP.NET ISAPI version mapped to an ASP.NET application determines which version of the common language runtime (CLR) is used for the application. The ASP.NET IIS Registration Tool (Aspnet_regiis.exe) allows an administrator or installation program to easily update the … Read more

What is ViewModel in MVC?

A view model represents the data that you want to display on your view/page, whether it be used for static text or for input values (like textboxes and dropdown lists) that can be added to the database (or edited). It is something different than your domain model. It is a model for the view. Let us say that … Read more