I have an MVC4 RC project created using VS2010. I'm not sure what happened, and suddenly I started getting the following error:
Error 1 'System.Web.Optimization.BundleCollection' does not contain the definition of 'RegisterTemplateBundles' and the extension method 'RegisterTemplateBundles' takes the first argument of the type You can find "System.Web.Optimization.BundleCollection" (are you missing the using directive or the assembly link?) C : \ xxxx \ xxxx \ Global.asax.cs 40 33 xxxx
The error starts with Application_Start ():
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); BundleTable.Bundles.RegisterTemplateBundles(); }
I have the following using statements in the Global.asax.cs file:
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Http; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing;
Any ideas ????
source share