I want to include my JS scripts in a Bundle AND at the same time version them to avoid browser caching if those scripts have been changed.
Is there a "native" way with ASP.NET MVC 5 to accomplish this?
I've found a library called Cassette that does exactly this (automatically versioning the JS, which is a good thing) but I wanted something (even) simpler, without changing a lot my script configuration...
The following does not work:
var version = ConfigurationManager.AppSettings["cache"].ToString();
bundles.Add(new ScriptBundle("~/bundles/scripts").Include(
"~/Scripts/framework.js" + version,
"~/Scripts/main.js"));
The result is that the "framework.js" file is not downloaded by the browser (probably is not found).