简体   繁体   English

缩小后,Asp.net捆绑/缩小返回旧文件

[英]Asp.net Bundling/minification return old files after minification

We are using bundling and minification with asp.net MVC with web optimization 1.1.0.0. 我们正在将asp.net MVC与Web优化1.1.0.0捆绑和缩小。 Previously it was working fine however we are facing issue now. 以前它运行良好,但是现在我们面临问题。

We have changed one of the js file and it is not reflecting in the minification, it taking older js file for minification. 我们更改了其中一个js文件,但该文件并未反映在缩小中,而是采用了较旧的js文件进行了缩小。 It also update the has once file get changed. 一旦文件被更改,它也会更新文件。

Whenever we add "BundleTable.EnableOptimizations = true" it minification done with older js file and render it on UI. 每当我们添加“ BundleTable.EnableOptimizations = true”时,它都会使用较旧的js文件进行缩小并将其呈现在UI上。 and when we "BundleTable.EnableOptimizations = false" it render updated JS file on UI. 当我们“ BundleTable.EnableOptimizations = false”时,它将在UI上呈现更新的JS文件。

Anyone has suggestion ? 有人有建议吗?

Actually problem was, i had the .min.js file of changed .js at the same location. 实际的问题是,我在同一位置更改了.js的.min.js文件。

i changed .js but havent changed .min.js 我更改了.js但尚未更改.min.js

If you have .min.js file the bundling/minification will pick up the .min file from folder. 如果您有.min.js文件,则捆绑/缩小将从文件夹中获取.min文件。

So please take care when you changes .js and you have .min.js @ same location. 因此,当您更改.js且具有.min.js @相同位置时,请务必小心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM