Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
部署站点时ASP.NET捆绑不起作用_Asp.net_Bundling And Minification_Asp.net Bundling - Fatal编程技术网

部署站点时ASP.NET捆绑不起作用

部署站点时ASP.NET捆绑不起作用,asp.net,bundling-and-minification,asp.net-bundling,Asp.net,Bundling And Minification,Asp.net Bundling,我很难理解为什么会发生这种情况 在我的global.asax中,我有 BundleTable.EnableOptimizations = true; 我也有这些台词 BundleTable.Bundles.Add(new StyleBundle("~/content/css/bundle"). Include("~/content/css/font-awesome.css", new CssRewriteUrlTransform()). Incl

我很难理解为什么会发生这种情况

在我的global.asax中,我有

BundleTable.EnableOptimizations = true;
我也有这些台词

BundleTable.Bundles.Add(new StyleBundle("~/content/css/bundle").
            Include("~/content/css/font-awesome.css", new CssRewriteUrlTransform()).
            Include("~/content/css/bootstrap.css").
            Include("~/content/css/bootstrap-theme.min.css").
            Include("~/content/css/carousel.css").
            Include("~/content/css/narrow.css").
            Include("~/content/css/navbarLogo.css").
            Include("~/content/css/goTop.css").
            Include("~/content/css/fbKomentar.css").
            Include("~/content/css/lightbox.css"));
在我的主页上我有

<%: System.Web.Optimization.Styles.Render("~/content/css/bundle") %>
我不会让我的脚本“解包”,我仍然会得到我的渲染路径

<link href="/content/bundle.css" rel="stylesheet">

这一切都可以在我的本地机器上正常工作(当然!!!)


任何帮助/指导都将不胜感激。关于这个问题,我已经阅读了这里的大部分票证,我尝试了很多人们推荐的东西,但都没有用。

如果css文件格式不好,通常会出现这种情况,请使用css代码进行测试

编辑: 请查看css文件:

goTop.css

在使用csslint的项目中,修复错误,它可能会工作

您的错误:

如果css文件的格式不好,通常会发生这种情况,请使用css代码进行测试

编辑: 请查看css文件:

goTop.css

在使用csslint的项目中,修复错误,它可能会工作

您的错误:

我不会说这是交易,否则它在本地也不起作用。我很抱歉科比,但这不起作用。老实说,我一开始就不认为它会起作用,因为*.css文件排在第七位,所以它本应该拾取第一张图纸,但它没有。我已经退回到使用正常的样式表链接,而不是失去更多的时间与此。我不会说这是交易,否则它不会在本地工作太多。我很抱歉科比,但这不起作用。老实说,我一开始就不认为它会起作用,因为*.css文件排在第七位,所以它本应该拾取第一张图纸,但它没有。我已经退回到使用样式表的正常链接,而不是再浪费时间了。如果其他人报告了同样的事情,我会关注它。效果很好。如果有其他人报告了同样的事情,我会关注它。
<link href="/content/bundle.css" rel="stylesheet">