Unable to add new MVC 5 View Pages

648 views Asked by At

After I installed Postal for MVC5 today, whenever I try to add a new MVC 5 View Page (Razor), I get the following error:

Error: this template attempted to load component assembly 'Microsoft.VisualStudio.Web.Mvc.5.0, Version=5.0.0.0, Culture=neutral, ...'

enter image description here

How can I fix this? I am not able to add new views to the project.

1

There are 1 answers

0
Chris Pratt On BEST ANSWER

Well, first, you mean you're not able to use the view scaffold. You can add anything you want to your project manually. A view is merely a text file with a cshtml or vbhtml extension, depending on what language you're using in it (C# or VB, respectively). Once you do enough work with MVC, you'll find the scaffolds actually get in the way. They're slow and you've usually have to make mass changes to them anyways.

That said, attempt to create the view without a model. If that works, then Visual Studio is just being buggy as it's oft to be. Try closing Visual Studio completely and restarting it. That usually fixes these types of things.