I have an MVC 5 application.
I have this code in _Layout.cshtml
<head>
......
@Styles.Render("~/Content/estilos")
@RenderSection("styles", required: false)
</head>
I have this other code in the view:
@section styles
{
@Styles.Render("~/Content/dataTables")
}
On the other hand, I have this in BundleConfig.cs file:
bundles.Add(new StyleBundle("~/Content/estilos").Include(
"~/Content/style.css",
"~/Content/site.css"));
bundles.Add(new StyleBundle("~/Content/dataTables").Include(
"~/Content/DataTables/css/dataTables.bootstrap4.css",
"~/Content/DataTables/css/fixedColumns.bootstrap4.css"));
With respect to files, these are present:
~/Content/site,css
~/Content/style.css
~/Content/DataTables/css/dataTables.bootstrap4.css
~/Content/DataTables/css/dataTables.bootstrap4.min.css
~/Content/DataTables/css/fixedColumns.bootstrap4.css
~/Content/DataTables/css/fixedColumns.bootstrap4.min.css
When I deployed the site, and set "debug = false" in "compilation debug="false" targetFramework="4.7.2" setting in web.config, I realized that only "estilos" bundle is loaded. "dataTables" bundle is missing.
When I set "debug = true", all CSS files are loaded.
What may be happening here?
Regards Jaime