0

I am trying to create versioning for the controllers in a location using bundle.add(new ScriptBundle().includedirectory()), as i have been getting the answers to use Include() , but i need to use `IncludeDirectory(). Please suggest me some solution or references so that i can achieve , below the BundleConfig code for my controller directory.

  bundles.Add(new ScriptBundle("~/bundles/Controllers").IncludeDirectory(
                "~/App/Controllers", "*.js", true));
  • If you use include directory, be aware that the other challenge you might have is Microsoft includes JS files not in any particular order, so you might have some dependency errors... – Brian Mains Jan 05 '17 at 13:22
  • @Brian exactly am facing injector error when i put `System.Web.Optimization.BundleTable.EnableOptimizations = true`. – Pramod Harlapur Jan 05 '17 at 14:35
  • Yeah I've never been able to include a directory at whole because of the dependencies across various scripts... This might be a way around it: http://stackoverflow.com/questions/19323409/asp-net-mvc-bundle-config-order – Brian Mains Jan 05 '17 at 16:50
  • I tried with orderer , still am facing the same issue . while adding angular files to bundle is the issue. – Pramod Harlapur Feb 15 '17 at 09:44

0 Answers0