MissingMethodException using out of the box DisplayTemplates in Razor

Nov 2, 2010 at 4:37 PM

After dropping @Html.MvcSiteMap().Menu() into a view using the Razor view engine, an exception is thrown when the page is rendered.

Method not found: 'Void System.Web.Mvc.WebFormView..ctor(System.String, System.String)'.

The workaround for this exception is to make sure to include display templates for each of the model under the DisplayTemplates folder in Views\{controllerName} or Shared\

Nov 2, 2010 at 7:47 PM

MVC3 is currently not officially supported. Check this post (http://mvcsitemap.codeplex.com/workitem/5312) for a method on how to make it work.