c# - ASP.Net MVC 5 sub-directory bundling issues -


i seeing weird behavior bundling in asp.net mvc 5 project. project works fine when explicitly declare files in bundleconfig.cs file follows:

bundles.add(new scriptbundle("~/bundles/app").include(                 "~/app/app.js",                 "~/app/config.js",                 "~/app/dir1/file1.js",                 "~/app/dir1/subdir1/file2.js",                 ..... 

however, if switch use includedirectory instead, script paths during development (bundletable.enableoptimizations = false) not complete. see:

bundles.add(new scriptbundle("~/bundles/app").include(                 "~/app/app.js",                 "~/app/config.js")                 .includedirectory("~/app/dir1", "*.js", true) 

chrome shows me 404 when trying file2.js. bundling system adds following layout page:

<script src="/app/app.js"></script> <script src="/app/config.js"></script> <script src="/app/dir1/file1.js"></script> <script src="/app/dir1/file2.js"></script> 

the path file2.js wrong. omits subdir1 part of path. missing here?

this known issue w/ version 1.1.1. upgrade package (or downgrade 1.1.0) , should fix problem.

web optimization path issue while in debug mode


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -