1

I have an mvc style bundle configured.

It has two css files to include. Here is the bundle in question:

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

There is literally no difference between these files.

Here is my usage of the bundle in my layout:

@Styles.Render("~/Content/css")

Opening the chrome inspector I find this:

<link href="/Content/site.css" rel="stylesheet">

But no jasmine.css.

What is the problem ? Why isn't my file included ?

EDIT

Here is the screenshot of the folder :

enter image description here

4

2 回答 2

1

我已经看到当文件丢失或我指定了错误的路径时会发生这种情况。验证路径"~/Content/jasmine.css"

于 2013-02-19T21:25:23.007 回答
1

您可以使用.Include("~/ContentAddress")要添加到捆绑包中的每个内容或脚本。

bundles.Add(new StyleBundle("~/Content/css")
.Include("~/Content/site.css")
.Include("~/Content/jasmine.css"));
于 2015-06-14T07:47:38.217 回答