I have MVC4 RC project created with VS2010. I am not sure what happened, all of a sudden I started getting the following error:
Error 1 'System.Web.Optimization.BundleCollection' does not contain a definition for 'RegisterTemplateBundles' and no extension method 'RegisterTemplateBundles' accepting a first argument of type 'System.Web.Optimization.BundleCollection' could be found (are you missing a using directive or an assembly reference?) C:\xxxx\xxxx\Global.asax.cs 40 33 xxxx
The error is comming from Application_Start():
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
BundleTable.Bundles.RegisterTemplateBundles();
}
I have the following using statements in my 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????