Whilst developing my website I have been adding styles directly to the cshtml files but I've now got to a stage where I'd like to include them in bundles instead. I have been going through my _Layout.cshtml and swapping out groups of styles with bundles and it's been going fine. However, I've come to a particularly stubborn style that isn't included when put in a bundle.
In my _Layout.cshtml I have the following style link:
<link href="@Url.Content("~/Scripts/plugins/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css")" rel="stylesheet" type="text/css" />
This works fine, I can see a visible difference in my datatables. However, if I now add it to a style bundle in my BundleConfig.cs like so:
bundles.Add(new StyleBundle("~/Styles/datatables").Include(
"~/Scripts/plugins/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css"));
And then add the bundle to my _Layout.cshtml like so:
@Styles.Render("~/Styles/datatables")
It just isn't included! I can see a visible difference in my datatable so I definitely know it's not working!
I have many other bundles working for both styles and scripts, it just appears to be this one..
Any ideas?
Thanks
UPDATE:
When I set EnableOptimizations to false, it all works fine. When I set EnableOptimizations to true, a lot of my styles stop rendering..
UPDATE 2
The only other time this happens is with the font-awesome.css stylesheet.