Considering this folder structure:
Content
style1.css
style2.css
CssFolder1
style3.css
style4.css
style5.css
style6.css
In the application, I want to include style1.css
, style2.css
, style3.css
and style4.css
.
I am doing this:
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new StyleBundle("~/styles/main").Include("~/Content/style1.css", "~/Content/style2.css"));
bundles.Add(new StyleBundle("~/styles/custom").Include("~/Content/CssFolder1/style3.css","~/Content/CssFolder1/style4.css"));
}
}
And in _Layout.cshtml
I render it like this:
@Styles.Render("~/styles/main", "~/styles/custom")
Only style1.css and style2.css are loaded. How to correctly load style3.css
and style4.css
?
LE: Content is a folder from the solution, all files within that folder are added to the solution.