I'm following guidance from the below link to create a javascript bundle in a VS2010 webforms website.
http://igorzelmanovich.blogspot.co.uk/2012/09/using-aspnet-bundling-and-minification.html
I've got this in my global.asax:
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
System.Web.Optimization.BundleTable.Bundles.Add(new System.Web.Optimization.ScriptBundle("~/bundles/js").Include("~/scripts/jquery.bxSlider.js"));
}
and this in my sitemaster (note I havent moved my main jquery source to the bundle just yet)
<script type="text/javascript" language="javascript" src="scripts/jquery-1.8.2.min.js"></script>
<%: System.Web.Optimization.Scripts.Render("~/bundles/js") %>
I've installed the Microsoft.AspNet.Web.Optimization package from Nuget and its got all the binaries and the website builds successfully. I've tried setting the web.config debug value to true and false, yet the bundles/js folder does not generate with a bundle containing jquery.bxSlider.js, i've created the bundles/js folder manually but still no luck.
When debugging the Application_Start does get called, just doesn't generate anything.
Do you get something like this?
or is it empty? for example:
<script src="/bundle/js"></script>