Quickie Debug

Setting up a new Microsoft MVC.NET site today, I made a possible error in not verifying the initial setup before ripping it into an alternate structure (mostly moving the controllers to a new class library and changing the MVC DLL references to a known version in source control versus what’sGAC), so when the time came to run the site for the first time I didn’t know who to blame for this error:

Compiler Error Message: CS1928: ‘System.Web.Mvc.HtmlHelper’ does not contain a definition for ‘ActionLink’ and the best extension method overload ‘System.Web.Mvc.Ajax.AjaxExtensions.ActionLink( System.Web.Mvc.AjaxHelper, string, string, System.Web.Mvc.Ajax.AjaxOptions)’ has some invalid arguments

The resolution, as found here, was to add:

<add namespace=”System.Web.Mvc.Html”/>

to the system.web/pages/namespaces section of web.config, and all was well.