When using BundleConfig
is it possible to include all files of a folder including all the files of the childfolders (and their childfolders etc.)?
I found .IncludeDirectory()
but it seems to only include the files of the folder itself, not the files of the subfolders.
Use the overload of IncludeDirectory method which accepts bool searchSubdirectories
as third parameter.
MSDN:
searchSubdirectories - Specifies whether to recursively search subdirectories of directoryVirtualPath.
Example:
bundles.Add(new ScriptBundle("~/bundles/scripts")
.IncludeDirectory("~/Scripts", "*.js", true));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With