With the presence of a Theme folder and a declaration in web.config such as <pages theme="light">, a MasterPage
automatically adds all of the CSS files in the Theme folder as correct links in the HTML head section.
The new ASP.NET V4.5 Bundling and Minification feature does not work automatically with Themes and Skins that contain CSS files.
What do I need to do to get it to bundle and minify all CSS files in a Theme folder?
Keep it Simp...
Member
549 Points
264 Posts
Bundling Minification on CSS in ASP.NET Themes folder
Dec 07, 2012 02:06 AM|LINK
A quick background on Themes:
With the presence of a Theme folder and a declaration in web.config such as <pages theme="light">, a MasterPage automatically adds all of the CSS files in the Theme folder as correct links in the HTML head section.
The new ASP.NET V4.5 Bundling and Minification feature does not work automatically with Themes and Skins that contain CSS files.
What do I need to do to get it to bundle and minify all CSS files in a Theme folder?
PS. I have looked at: http://weblogs.asp.net/scottgu/archive/2011/11/27/new-bundling-and-minification-support-asp-net-4-5-series.aspx
but it does not discuss Themes and Skins.
urenjoy
Star
12367 Points
1862 Posts
Re: Bundling Minification on CSS in ASP.NET Themes folder
Dec 07, 2012 07:45 AM|LINK
Have a look at following:
http://boniestdeveloper.net/2012/10/30/UsingTheBundlingAndMinificationWebOptimisationsWithAspNetWebFormsAppThemes.aspx
Keep it Simp...
Member
549 Points
264 Posts
Re: Bundling Minification on CSS in ASP.NET Themes folder
Dec 07, 2012 08:47 PM|LINK
urenjoy - Thanks for the link.
App_Themes for CSS, Skins and images have been an integral part of ASP.NET ever since V2.0; and have stayed with us through V3.5 and v4.0
Assuming the above URL is correct, I do not understand why the new ASP.NET V4.5 bundling and minifcation does not work with App_Themes.
Microsoft, could you please provide a fix for this in the next Visual Studio 2012 Update?
Alternatively, if it does work, a link to documentation would be great.