从一个全新的ASP.NET MVC 4 Beta Web应用程序,我正在重新安排我的文件夹以匹配Rob Conery的
VidPub.Web example
具体来说,这意味着内容的最终目录结构如下所示
VidPub.Web | ---Public | |---Images |--- *.png |---javascripts |--- *.js |---stylesheets |----themes |---base |--- images |--- *.css |----site.css
但是,当我在_Layout.cshtml中更改以下行时
<link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Content/css")" rel="stylesheet" type="text/css" /> <link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Content/themes/base/css")" rel="stylesheet" type="text/css" /> <script src="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Scripts/js")"></script>
至
<link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Public/stylesheets/css")" rel="stylesheet" type="text/css" /> <link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Public/stylesheets/themes/base/css")" rel="stylesheet" type="text/css" /> <script src="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl( "~/Public/javascripts/js")"></script>
我最终得到的HTML中没有任何结果.
<link rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" /> <script></script>
为什么不在新位置拾取文件?