This error began to appear after update to the latest version of Optimization of System.Web.Optimization.
'System.Web.Optimization.BundleCollection' does not contain a definition for 'EnableDefaultBundles'
This also applies for BundleTable.Bundles.RegisterTemplateBundles();
Make sure you get the latest Microsoft Asp.Net Web Optimization Framework
via the NuGet.
Verify that you have BundleConfig.cs
placed in the App_Start
folder and also verify that the BundleConfig.cs
has its Namespace set to the application root Namespace like: namespace MeApp
In the Global.asax use BundleConfig.RegisterBundles(BundleTable.Bundles);
protected void Application_Start()
{
...
BundleConfig.RegisterBundles(BundleTable.Bundles);
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With