I am using John Papa's SPA jump start App to create my own app and for every part of his tutorial I complete I keep running into the same problem.
In a new section of the tutorial I have to add another javaScript file and to this I use BundleConfig.cs. I copy and paste the .Include method and add the new JS file. But in firebug I can't see the script in the network tab.
using System;
using System.Web.Optimization;
namespace AgencyUpdate
{
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.IgnoreList.Clear();
AddDefaultIgnorePatterns(bundles.IgnoreList);
bundles.Add(
new ScriptBundle("~/scripts/modernizr")
.Include("~/scripts/modernizr-{version}.js"));
bundles.Add(
new ScriptBundle("~/scripts/vendor")
.Include("~/scripts/jquery-{version}.min.js")
.Include("~/scripts/bootstrap.min.js")
.Include("~/scripts/knockout-{version}.js")
.Include("~/scripts/sammy-{version}.js")
.Include("~/scripts/moment.min.js")
.Include("~/scripts/Q.js")
.Include("~/scripts/breeze.min.js")
.Include("~/scripts/toastr.js"));
bundles.Add(
new StyleBundle("~/Content/css")
.Include("~/Content/ie10mobile.css") // Must be first. IE10 mobile viewport fix
.Include("~/Content/bootstrap.min.css")
.Include("~/Content/bootstrap-responsive.min.css")
.Include("~/Content/font-awesome.min.css")
.Include("~/Content/toastr.css")
.Include("~/Content/styles.css")
);
}
public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
{
if (ignoreList == null)
{
throw new ArgumentNullException("ignoreList");
}
ignoreList.Ignore("*.intellisense.js");
ignoreList.Ignore("*-vsdoc.js");
//ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
//ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
//ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
}
}
}
Is this a bug or quirk of Visual Studio 20120?