Can not add view to any controller in mvc 5

Hello everyone We have searched this error beforehand, but nothing seemed to be our case, since all of the problems that were mentioned were because of using EF Code first, that we are not using it. After migrating to MVC5, we ran into a problem. Whenever we want to add a view to our controller, we get the following error:

there was an error running the selected code generator value cannot be null

BTW, we are using LINQ to SQL,and we are not scaffolding the view. We have left the Template Empty(Without model), and we are not using layout page. Our project is using ASPX view engine. We had no problem in VS 2012. After migrating to VS 2015 we are running into this problem. Has ASPX view engine been removed from VS 2015. Could it be the problem? Any kind of help would be highly appreciated.

Upvotes: 1

Views: 671

Answers (2)

shhhhh
shhhhh

Reputation: 41

If Prompt for

there was an error running the selected code generator values does not fall selected range in visual studio

web.config has been deleted or renamed. Please check your web.config file. Might be there were any additional tag would be added.

Upvotes: 2

anand
anand

Reputation: 1579

You can do this by doing the below method
All I had to do is install Web Essentials 2015.1 , restarted Visual Studio, repeated the Add View action, and it worked, don't have an explanation to this, but it worked.

Upvotes: 0

Related Questions