I am looking into the ASP.NET MVC4 System.Web.Optimization bundling and was wondering how would you go about serving up some CSS files from a CDN and others local to a server?
Is that possible?
It looks like the bundles.UseCdn = true is at the collection level and not a setting for an individual bundle.
Any guidance would be appreciated.
Correct, right now the only CDN support is on a per bundle level, you cannot have a bundle with some individual assets coming from the CDN and some locally at this time. Basically its either or: you can have the bundle use the cdn with fallback to the local server's bundle, or the entire bundle must be on the CDN.
UPDATE: But to clarify, you can have some bundles on CDN and some bundles local. That is controlled by the CdnPath on the bundle instance. Basically if there is no CdnPath set on an individual bundle, it will always be served locally.