视觉工作室 2012 - Asp.net MVC3
我正在使用microsoft asp.net web优化框架进行捆绑和缩小,但是我在使用捆绑和缩小时出现问题,一切正常的地方,但我需要在创建虚拟目录时创建一个物理目录(文件夹) amazon s3 与我的缩小、捆绑和图像。
我的代码在本地工作 100% 好的,这是我的代码
protected void Application_Start()
{
BundleTable.EnableOptimizations = true;
RegisterBundles(BundleTable.Bundles);
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
}
public static void RegisterBundles(BundleCollection bundles)
{
/ * This example ~ / Content / css would be a physical folder containing the bundle, images and css minificados have a separate server just for images and css and javascript * /
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/Site.css"));
}
在我的布局视图中
<!DOCTYPE html>
<html>
<head>
<title>@ViewBag.Title</title>
@System.Web.Optimization.Styles.Render("~/Content/css")
</head>
<body>
<div class="page">
<div id="header">
<div id="title">
<h1>My MVC Application</h1>
</div>
<div id="logindisplay">
@Html.Partial("_LogOnPartial")
</div>
<div id="menucontainer">
<ul id="menu">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
</ul>
</div>
</div>
<div id="main">
@RenderBody()
</div>
<div id="footer">
</div>
</div>
</body>
</html>
知道怎么做吗?