Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does ResolveBundleUrl not work for custom folders? (MVC Beta 4)
    primarykey
    data
    text
    <p>From a brand-new ASP.NET MVC 4 Beta Web Application, I'm re-arranging my folders to match Rob Conery's <a href="https://github.com/tekpub/mvc3/tree/master/Source/VidPub.Web" rel="nofollow noreferrer">VidPub.Web example</a></p> <p>Specifically, this means that the final directory structure for content looks like this</p> <pre> VidPub.Web | ---Public | |---Images |--- *.png |---javascripts |--- *.js |---stylesheets |----themes |---base |--- images |--- *.css |----site.css </pre> <p>However, when I change the following lines in <code>_Layout.cshtml</code></p> <pre><code>&lt;link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Content/css")" rel="stylesheet" type="text/css" /&gt; &lt;link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Content/themes/base/css")" rel="stylesheet" type="text/css" /&gt; &lt;script src="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Scripts/js")"&gt;&lt;/script&gt; </code></pre> <p>to</p> <pre><code>&lt;link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Public/stylesheets/css")" rel="stylesheet" type="text/css" /&gt; &lt;link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Public/stylesheets/themes/base/css")" rel="stylesheet" type="text/css" /&gt; &lt;script src="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Public/javascripts/js")"&gt;&lt;/script&gt; </code></pre> <p>I end up with absolutely nothing in the resulting HTML.</p> <pre><code>&lt;link rel="stylesheet" type="text/css" /&gt; &lt;link rel="stylesheet" type="text/css" /&gt; &lt;script&gt;&lt;/script&gt; </code></pre> <p>Why isn't it picking up the files in their new locations?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload