Monday, February 9, 2015

MVC: CS1061: System.Web.Mvc.HtmlHelper does not contain a definition for 'EnumDropDownListFor'

Error:
CS1061: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'EnumDropDownListFor' and no extension method 'EnumDropDownListFor' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?)

Solution: to resolve this error, update MVC to latest version for my case, it is Microsoft ASP.Net MVC 5.1. Install it using NuGet package.
Search for Microsoft ASP.Net MVC.

Accept License. Read it or leave it, but accept it.. :P


Restart visual studio after installation of package.


This should resolve your error.

No comments:

Post a Comment