Refer a CSS file in BundleConfig generate WebGrease.dll error

asp.net-mvc, bundle

Solution

I had the same issue . My project is done using MVC5. I tried updating the webGrease using NuGet package manager and reopened the solution and it worked .

Problem

When I put a specific CSS file called `glyphicons.css` in my BundleConfig occurs the following error `An exception of type 'System.IndexOutOfRangeException' occurred in WebGrease.dll but was not handled in user code` and the file exist in my solution in the specific path, like all the anothers CSS files. Someone has faced this problem yet ? ``` bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/css/bootstrap.css", "~/Content/css/uploadfyBoot/style.css", "~/Content/css/uploadfyBoot/jquery.fileupload.css", "~/Content/css/tipografia.css", "~/Content/css/glyphicons.css" )); ``` If I remove the reference to glyphicons.css it works.

Original source