EmbeddedResourceVirtualPathProvider + Bundling with wildcards

634 views Asked by At

I'm using the (EmbeddedResourceVirtualPathProvider ) to allow views etc. to exist in a different DLL. I've got all this working nicely apart from the bunding, I've upgraded Microsoft.AspNet.Web.Optimization to 1.1.2 which supports VPP but I can't get wildcards working.

e.g. This works.

bundles.Add(new ScriptBundle("~/bundles/modernizr").Include("~/Scripts/modernizr-2.6.2.js"));

This doesn't

bundles.Add(new ScriptBundle("~/bundles/modernizr").Include("~/Scripts/modernizr-*"));

I get an ArgumentException "Directory does not exist." with the following StackTrace

   at System.Web.Optimization.Bundle.Include(String virtualPath, IItemTransform[] transforms)
   at Shell.BundleConfig.RegisterBundles(BundleCollection bundles) in c:\dev\test\CIT\Shell\App_Start\BundleConfig.cs:line 24
   at CIT.MvcApplication.Application_Start() in c:\dev\test\CIT\CIT\Global.asax.cs:line 22

As far as I can see it's not going into the VPP code at all, it's obviously not the end of the world to fully specify the paths but I'd like to get this working if I can

0

There are 0 answers