CSS changes on MVC App not working

一笑奈何 提交于 2019-11-29 07:29:43

This is likely due to the bundling framework using bootstrap.css in local/debug mode and bootstrap.min.css when you deploy. The framework uses a set of conventions when determining which files to add to a bundle, one of which is to use the .min version of a file, if it exists, for release builds. This is probably what's biting you. You made the change in bootstrap.css but not in bootstrap.min.css.

Try deleting bootstrap.min.css and re-deploying. This should force the frameworkt to minify and use the bootstrap.css file that you modified.

This issue drove me crazy until I read someone's comment about cached browser data! In FireFox, I used ctrl-r to reload the page and everything came up as expected. Long story short, always clear your cache before checking for published style changes.

In terms of my azure website, I went into the portal and stopped and restarted the service and this seemed to force a style refresh for users.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!