WindowsAzure上的CSS和图像
该项目是在MVC5上完成的,当我通过azure上的visual studio发布该项目时,图像和css效果无法完成。我确实尝试了Bundling.config,但仍然无法完成。我有一个img文件夹内的内容(它有所有的图像) 我的捆绑包配置文件中包含以下内容: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",
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")
注意,如果在