Has anyone else reached the limits of the new Bundling and Minification framework?
I've had to build custom bundles and transforms for things that I would have expected out of the box, but the one that's got me banging my head against the wall now is the
media attribute for CSS bundles.
which offers no opportunity for declaring one bundle for screen and another for print.
Microsoft have been mentioning this new bundling and minification framework on almost every occasion that they talk about .NET 4.5, and yet there are several things that other plugins offer which MSFT's version lacks.
And on this occasion (the media attribute) I can't see how I can easily override the default action because the pivotal AssetManager class is declared as 'internal sealed'. So you can't even get around some of the shortcomings.
@awj, see this link stackoverflow.com/.../make-asp-net-bundling-specify-media-screen-for-css-bundle
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
For any future readers of this post, this is the link that's mostly missing from Imran's post.
Imran, as you're obviously one of the devs who worked on the Optimisation Framework (by the look of your blog) can I also suggest something else? I've built my own classes on top of the Optimisation Framework so that I can add virtual paths to a static collection,
then render all references in this collection in a single place (for example, at the bottom of a master page).
This is something that other frameworks offer and I'd like to see it rolled into the MSFT version.
Thanks. But I am just a developers like you. For any suggestion and issues, you can use
this site. I am sure the ASP.NET Optimization team will welcome you.
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
Bundling pre release now support DefaultTagFormat and RenderFormat. See
this.
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
awj
Member
116 Points
67 Posts
Bundling and Minification limitations - anyone else?
Dec 10, 2012 09:03 AM|LINK
Has anyone else reached the limits of the new Bundling and Minification framework?
I've had to build custom bundles and transforms for things that I would have expected out of the box, but the one that's got me banging my head against the wall now is the media attribute for CSS bundles.
There's no way to set it.
The <link tag is pretty much hard-coded:
private static string RenderCssLink(string path) { return ("<link href=\"" + HttpUtility.UrlPathEncode(path) + "\" rel=\"stylesheet\"/>"); }which offers no opportunity for declaring one bundle for screen and another for print.
Microsoft have been mentioning this new bundling and minification framework on almost every occasion that they talk about .NET 4.5, and yet there are several things that other plugins offer which MSFT's version lacks.
And on this occasion (the media attribute) I can't see how I can easily override the default action because the pivotal AssetManager class is declared as 'internal sealed'. So you can't even get around some of the shortcomings.
imran_ku07
All-Star
45815 Points
7698 Posts
MVP
Re: Bundling and Minification limitations - anyone else?
Dec 12, 2012 05:48 PM|LINK
@awj, see this link stackoverflow.com/.../make-asp-net-bundling-specify-media-screen-for-css-bundle
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD
awj
Member
116 Points
67 Posts
Re: Bundling and Minification limitations - anyone else?
Dec 12, 2012 06:06 PM|LINK
Thanks, that is indeed useful.
For any future readers of this post, this is the link that's mostly missing from Imran's post.
Imran, as you're obviously one of the devs who worked on the Optimisation Framework (by the look of your blog) can I also suggest something else? I've built my own classes on top of the Optimisation Framework so that I can add virtual paths to a static collection, then render all references in this collection in a single place (for example, at the bottom of a master page).
This is something that other frameworks offer and I'd like to see it rolled into the MSFT version.
imran_ku07
All-Star
45815 Points
7698 Posts
MVP
Re: Bundling and Minification limitations - anyone else?
Dec 13, 2012 04:43 AM|LINK
Thanks. But I am just a developers like you. For any suggestion and issues, you can use this site. I am sure the ASP.NET Optimization team will welcome you.
Here are some new features in pre-releases.
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD
imran_ku07
All-Star
45815 Points
7698 Posts
MVP
Re: Bundling and Minification limitations - anyone else?
Dec 16, 2012 03:26 AM|LINK
Bundling pre release now support DefaultTagFormat and RenderFormat. See this.
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD