发布ASP.NET MVC应用程序时出现CSS绑定问题
我试图在本地网络服务器上发布我的ASP.NET MVC 5应用程序,但未找到我在布局视图中绑定的CSS文件(bundleConfig.cs中的绑定定义为发布ASP.NET MVC应用程序时出现CSS绑定问题,css,asp.net-mvc-5,publish,Css,Asp.net Mvc 5,Publish,我试图在本地网络服务器上发布我的ASP.NET MVC 5应用程序,但未找到我在布局视图中绑定的CSS文件(bundleConfig.cs中的绑定定义为 bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/bootstrap.css", "~/Content/site.css")); ),当我更换 @Styles.Render(“
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
),当我更换
@Styles.Render(“~/Content/css”)
与
它可以工作。发布您的
捆绑包定义“~/Content/css”
您找到解决方案了吗?
<link href="~/Content/bootstrap.css" rel="stylesheet" />
<link href="~/Content/Site.css" rel="stylesheet" />