I have an ASP.NET MVC app that includes bootstrap. My directory structure looks like this:
/
/App_Start
BundleConfig.cs
/Content
app.css
bootstrap.min.css
/Fonts
glyphicons-halflings-regular.eot
glyphicons-halflings-regular.svg
glyphicons-halflings-regular.ttf
glyphicons-halflings-regular.woff
glyphicons-halflings-regular.woff2
I need to bundle Bootstrap in my app. In my BundleConfig.cs file, I have the following:
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new StyleBundle("~/public/bundles/css")
.Include("~/Content/bootstrap.min.css")
.Include("~/Content/app.css")
);
bundles.Add(new ScriptBundle("~/public/bundles/scripts")
.Include("~/Scripts/jquery-2.1.4.min.js")
.Include("~/Scripts/jquery-ui-1.11.4.min.js")
.Include("~/Scripts/bootstrap.min.js")
.Include("~/Scripts/jquery.validate.min.js")
.Include("~/Scripts/jquery.validate.unobtrusive.min.js")
);
}
When bundling is turned OFF, everything renders fine. When I turn bundling ON, everything renders fine, except for the font icons. When I look in the console window, I see 5 404 errors related to the font icons. Its like its trying to reference the font files like the following:
http://localhost:9090/public/fonts/glyphicons-halflings-regular.woff2
Yet, they do not exist in the public directory. I'm not sure how to remedy this problem.