I have two questions: one about error and one about cdn
QUESTION 1: (ERROR)
I just added a new NuGet package: Microsoft ASP.NET Web Optimization Framework 1.0.0. I am using ASP.NET MVC 3 and everything seems to work, except for one big mistake.
If I use debug = "true" in web.config, then no script tags are ever output. I checked the view source and there are no tags for this package.
If I set debug = "false" , then I get a script tag that points to my thumbnail file.
* Is this a mistake? Has anyone else experienced this? *
As a workaround so that I can debug my application, I forcefully optimized it regardless of whether I am in debug mode or not BundleTable.EnableOptimizations = true;
QUESTION 2: (CDN)
Another question I have about CDN support:
bundles.Add(new ScriptBundle("~/bundles/jquery", jqueryCdnPath).Include( "~/Scripts/jquery-{version}.js"));
If I want to add another script with CDN support, then I have to add another package, so if UseCdn = "false", then it will try to load 2 scripts separately, which means 2 requests. Is there a way to have CDN support for multiple scenarios so that it combines them into a single request if UseCdn = "false"?
Something like that:
bundles.Add(new ScriptBundle("~/bundles/multiple").Include( "~/Scripts/jquery-{version}.js", jqueryCdnPath, "~/Scripts/jquery-ui-{version}.js", jqueryUICdnPath, ));
Regards DotnetShadow