Sitecore MVC error: IDisplayMode

Yesterday I ran into the following error while setting up a MVC project for Sitecore 7.2

Method not found: ‘System.Web.WebPages.IDisplayMode System.Web.Mvc.ControllerContext.get_DisplayMode()’.

Description: An unhandled exception occurred.

Exception Details: System.MissingMethodException: Method not found: ‘System.Web.WebPages.IDisplayMode System.Web.Mvc.ControllerContext.get_DisplayMode()’.

Problem was very easily solved by removing the Microsoft.Web.Mvc.FixedDisplayModes.dll

The dll is an old legacy fix for MVC4 and it can safely be removed when working with MVC5.

Share