WindowsAzure上的CSS和图像

WindowsAzure上的CSS和图像,azure,model-view-controller,bundle,Azure,Model View Controller,Bundle,该项目是在MVC5上完成的,当我通过azure上的visual studio发布该项目时,图像和css效果无法完成。我确实尝试了Bundling.config,但仍然无法完成。我有一个img文件夹内的内容(它有所有的图像) 我的捆绑包配置文件中包含以下内容: bundles.Add(new StyleBundle("~/Content/img").Include( "~/Content/bootstrap.css",

该项目是在MVC5上完成的,当我通过azure上的visual studio发布该项目时,图像和css效果无法完成。我确实尝试了Bundling.config,但仍然无法完成。我有一个img文件夹内的内容(它有所有的图像)

我的捆绑包配置文件中包含以下内容:

bundles.Add(new StyleBundle("~/Content/img").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/site.css",
                      "~/Content/base.css",
                      "~/Content/parallaxstyle.css",
                      "~/Content/bootstrap.css",
                     "~/Content/pricing.css",
                     "~/Content/pricing2.css"));
鉴于:

@Scripts.Render("~/Content/img")
但它甚至不渲染css文件

这是根。 布局视图:

<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Content/css")

    @Styles.Render("~/Content/img/demo/_small")
    @Scripts.Render("~/bundles/modernizr")
    @Styles.Render("~/Content/bootstrap.css")
    @Styles.Render("~/Content/base.css")
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Josefin+Slab">
    <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>

</head>
<body>

@视图包。标题
@style.Render(“~/Content/css”)
@Styles.Render(“~/Content/img/demo/\u small”)
@Scripts.Render(“~/bundles/modernizer”)
@style.Render(“~/Content/bootstrap.css”)
@style.Render(“~/Content/base.css”)

这是因为您创建了一个
样式包
,并试图呈现一个
脚本包

更改此项:

@Scripts.Render("~/Content/img")
为此:

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

注意,如果在>/Cult/IMG中有一个实际文件夹,请考虑更改包的名称,以便不存在名称冲突。

我确实将它更改为样式。这是我的网站。哪一块坏了?看起来这些CSS文件正在加载。如果你的站点中有一个“Content/img”文件夹,那么你需要重命名该捆绑包;我看不到图像。另外,对于其他选项卡,如OverView,无法看到CSS效果。请阅读整个注释。我怀疑您的“内容”文件夹中有一个“img”子文件夹。更改捆绑包的名称,以避免名称冲突。例如,“~/Content/sitestyle”也没用。无法获取其他页面的图像和CSS效果。我拥有的是内容,css文件就在那里。在内容中有一个图像文件夹和其他子文件夹。