In MVC 4, using the Bundles
to define the files you want to include, you can use a {version}
wildcard, for example...
"~/Scripts/jquery-{version}.js"
This works well when you have one version in the folder, e.g. jquery-1.7.js
. However, when we have two versions in the folder jquery-1.7.js
& jquery-1.9.js
, it seems to pick up the old version, ignoring the new version.
Does the {version}
wildcard find the first instance, and then move on? if so, the first instance in this example seems to the be the old version (as 1.7 comes before 1.9). So, is there a way of forcing it to look for the newest version if we have two files?
NOTE: The above version numbers may not be accurate, just used for scenario purpose.
We ended up using something similar to this post, which tackles a similar issue. I will update the answer with a full description and code in the next few weeks once implemented fully.