When I run my code from Visual Studio in release mode, and check the bundled style sheet, I can see my updates to the css files in that bundle. However when I publish the we
I recently encountered a similar issue with bundling. I use angularJS in a webapi project in visual studio.
My web.config had debug set to true. I set it to false. No change.
Then I tried setting my compiler conditions to true (in global.asax.cs|app...start method):
'#if DEBUG'
'BundleTable.EnableOptimizations = true;'
'#else'
'BundleTable.EnableOptimizations = true;'
'#endif'
That did not work either.
Finally I ended up moving the referenced/missing file (a ) in the bundle to another place in the stack. When I debug I uncomment the file from the bundle because I include it directly in the index.html. It's possible that VS did not compile the change when I restored it.
' bundles.Add(new ScriptBundle("~/SomeBundleName.js")
.Include("~/Scripts/IWASMissingIntheBundle.js")
.Include("~/Scripts/IWASNEVERMISSINGANDstillhere.js")
.Include("~/Scripts/MOVEDIWASMissingHEREANDNOWImFound.js")'
My proposition is that the compiler did not pick up the change and regardless of cleaning and rebuilding still did not. After moving the file and republishing it seemed to work.
But also I cleared the cache in my browser, not just from the "Clear Cache" button that I use in Chrome, but also from the debugger|Network panel. Some stepping through the above should help.