我用MVC 5创建了我的第一个网站,它在我的本地机器上运行良好,但当我将其发布到服务器时,一些CSS没有正确缩小.
/* Minification failed. Returning unminified contents.
(80,1): run-time error CSS1019: Unexpected token, found '@import'
(80,9): run-time error CSS1019: Unexpected token, found 'url('../Content/dark-skin/skin.css')'
(671,16): run-time error CSS1062: Expected semicolon or closing curly-brace, found ':'
(1288,16): run-time error CSS1062: Expected semicolon or closing curly-brace, found ':'
(1680,1): run-time error CSS1019: Unexpected token, found '@keyframes'
(1682,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '50%'
(1685,1): run-time error CSS1019: Unexpected token, found '@-webkit-keyframes'
(1687,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '50%'
*/
/* NUGET: BEGIN LICENSE TEXT
*
* Microsoft grants you the right to use these script files for the sole
* purpose of either: (i) interacting through your browser with the Microsoft
* website or online service, subject to the applicable licensing or use
* terms; or (ii) using the files as included with a Microsoft product subject
* to that product's license terms. Microsoft reserves all other rights to the
* files not expressly granted by Microsoft, whether by implication, estoppel
* or otherwise. The notices and licenses below are for informational purposes only.
*
* NUGET: END LICENSE TEXT */
/*!
* Bootstrap v3.0.0
*
* Copyright 2013 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat.
*//*! normalize.css v2.1.0 | MIT License | git.io/normalize */
在try 更正一些错误并再次发布后,错误看起来是一样的.
最奇怪的是,为了网站的目的,我稍微修改了bootstrap.css
个.当我发布它时,更改不在Bundle 文件中.是否有可能 bootstrap 是从 bootstrap 服务器加载的,而不是我的项目?
bundles.Add(new StyleBundle("~/Content/cssmain").Include(
"~/Content/bootstrap.css",
"~/Content/site.css",
"~/Content/ilightbox.css",
"~/Content/bannerscollection_zoominout.css"));
我也试着自己使用Web应用程序进行缩小,但我的更改看不到,文件似乎也没有缩小.
感谢您的帮助.