Issues with System.Web.Optimization when using Areas on a Web Converted from ASP.NET MVC 3 to ASP.NET MVC 4

If you convert an existing ASP.NET MVC 3 application to ASP.NET MVC 4, any new area you add to your project will throw a compilation exception about System.Web.Optimization on every view or partial view in the area. To fix the problem, simply remove the add element for namespace=”System.Web.Optimization” from the area’s web.config or install the Nuget package if you want to use the bundling and minification optimization feature in MVC 4.

Author: Tom Cabanski

Software Developer and Entrepreneur

%d bloggers like this: