As a developer we all had this problem: you need to do maintenance on a website and there is clientscript: foo.js
Now you make changes to foo.js
and you test it, check in, deploy the new code on the test environment.
Now the test user claims you did not fix the problem, because his browser still holds the old foo.js
in cache.
I was thinking of creating a hash of the filecontents and use that in the filename. foo_8c736521.js
I could create the hash -> rename the file -> and update the BundleConfig.cs
But I want this to be done automatically within visual studio.
Is there a library of some sort that handles this for me in C# .NET?
I have added this transformation to my web.Test.config file:
<system.web>
<compilation debug="false" targetFramework="4.5" xdt:Transform="Replace" />
</system.web>
Now the Bundle optimizations are enabled in this environment. And it works.