样式表和脚本包在Mono中不起作用

xam*_*mir 12 javascript asp.net-mvc mono css3 bundling-and-minification

背景:我在迁移的ASP.NET MVC 5应用程序(在开发Windows 8.1, VS2013社区.NET 4.5.1,MySql自定义成员资格和角色提供)项目Monodevelop(在Ubuntu 14.4,Monodevelop,Mono).

在我的~/App_Start/BundleConfig班上

public static void RegisterBundles(BundleCollection bundles)
    {
        BundleTable.EnableOptimizations = true;

     bundles.Add(new StyleBundle("~/Content/css").Include(
                  "~/Content/bootstrap.css",
                  "~/Content/site.css"));

        bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                    "~/Scripts/modernizr-*"));
    }
Run Code Online (Sandbox Code Playgroud)

在我~/Views/Shared/_Layout.cshtml看来

@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
Run Code Online (Sandbox Code Playgroud)

在我的 Web.Config

<add namespace="System.Web.Optimization" />
Run Code Online (Sandbox Code Playgroud)

<compilation defaultLanguage="C#" debug="false"> </compilation>
Run Code Online (Sandbox Code Playgroud)

Microsoft.Web.Infrastructure.dll从bin目录中删除.

问题:当我在浏览器中查看源代码时,我没有看到正在渲染包:

链接指向目录,它应该显示目录中的文件

<link href="/Content/css" rel="stylesheet"/>
<script src="/bundles/modernizr"></script>
Run Code Online (Sandbox Code Playgroud)

这个捆绑在Windows上运行得非常好,但在Ubuntu上,我只看到目录

我在这做错了什么?

Mih*_*rea 6

BundleConfig文件中添加以下内容:

BundleTable.EnableOptimizations = true;
Run Code Online (Sandbox Code Playgroud)

然后切换到释放模式.

这应该可以解决问题