Reputation: 2199
I am trying to use the asp.net bundling and minification feature. The issue is when i am including the jquery ui custom script in the bundle than the script is not rendering in my layout page. The code is:
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.custom.js"));
bundles.Add(new StyleBundle("~/content/jquery").Include(
"~/Content/jquery-ui-{version}.custom.css"));
The above both CSS and script is not including. What am I doing wrong here ?
Upvotes: 2
Views: 478
Reputation: 5785
Once you've created the bundles, you'll need to add them to your HTML somewhere. Usually in the _Layout.cshtml, you'll need a line like this:
@Scripts.Render("~/bundles/jqueryui")
Upvotes: 2
Reputation: 1
One more option to debug the issue is installing the fiddler and checking the files downloaded while making the request for the webpage Just click on the missing file name in the fiddler and check what is the content returned. In my case it returned the error message Could not load file or assembly WebGrease. I have removed and added the reference and now the script files are rendered.
Upvotes: 0