I have seen many questions and answers about this; but none of the answers seem to give me a direction here.
The following code works fine when I specify the virtual path as an address to a physical file:
bundles.Add(new Bundle("~/Modules/SIRVA.Connect.Intake.SAP/Content/style.css")
.Include("~/Modules/Intake/Content/Style.css"));
However, if I specify a virtual path that does not exist in the file system (like so...):
bundles.Add(new Bundle("~/content/intake.css")
.Include("~/Modules/Intake/Content/Style.css"));
... MVC will render the the style but when you click on the href it displays, "Page not found," and the styles don't work (because they aren't there).
<link href="/content/intake.css" rel="stylesheet"/>
MVC's own examples appear to point to a non-existent physical location as the virtual path, but it works fine when they do it!
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"
));
Can anyone tell me why I have to set the virtual path of the Bundle()
constructor to a physical file location?