Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refer a CSS file in BundleConfig generate WebGrease.dll error

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.

like image 439
Lucas_Santos Avatar asked May 23 '14 12:05

Lucas_Santos


1 Answers

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 .

like image 180
Malik Avatar answered Oct 29 '22 13:10

Malik