Cannot find BundleCollection in BundleConfig.cs

I am trying to add BundleConfig.cs to my Mvc project. Also I added to Global.asax

BundleConfig.RegisterBundles(BundleTable.Bundles); 

      

But there is a bug with BundleTable. My BundleConfig.cs code:

public class BundleConfig
{
    public static void RegisterBundles(BundleCollection bundles)
    {

    }
}

      

+3


source to share


1 answer


You have to add System.Web.Optimization

the namespace to BundleConfig.cs

.



Also you may need to install Microsoft ASP.NET Web Optimization Framework

nuget package

+4


source







All Articles