项目在本地运行没有问题,发布后部署iis后样式找不到
原因:
@Styles.Render("~/dist/css");
bundles.Add(new StyleBundle("~/dist/css").Include(
"~/dist/css/AdminLTE.min.css",
"~/dist/css/skins/_all-skins.min.css"
));
应该是发布后使用绑定与文件夹名称冲突找不到
解决办法:
将两个css引用分开,更改@Styles.Render(“~/dist/css“)为@Styles.Render(“~/dist/style“);
bundles.Add(new StyleBundle("~/dist/style").Include(
"~/dist/css/AdminLTE.min.css"// Theme style));
bundles.Add(new StyleBundle("~/dist/sink").Include(
"~/dist/css/skins/_all-skins.min.css"));
问题解决.