Fix CSS files rendering for branding folder #5828
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Styles are not being rendered from
~/Branding/Content/
folder. It’s only getting rendered from~/Content/
and it’s subfolders.In AppActivator.cs code file, StyleBundle includes files from
~/Content/
and~/Branding/Content/
as follows:But styles/.css files that I added under
~/Branding/Content/
folder is not being rendered at all. That defeats the purpose of having this folder.After trial/error and some reading, I found out following article that mentions same StyleBundle won’t work for different directories (root directories), like Content and Branding in this case.
https://stackoverflow.com/questions/30120357/bundling-files-in-different-directories
So I added another include statement to add
~/Content/Branding/
folder without removing~/Branding/Content/
.In my opinion, include statement of
~/Branding/Content/
should be deleted because it’s not providing any value if it’s not rendering files from that folder. But I left it there for NuGet team to decide.P.S.: I tried having two StyleBundles one with Content folder and other StyleBundle with \Branding\Content folder, but couldn't use different StyleBundles on the same page.