title: Why does ASP.Net bundling include multiple versions of matching files? Can I stop this?
body: <p>When I bundle a script like so:</p>
  
  <pre><code>    bundles.Add(new ScriptBundle("~/bundles/Product/Details").Include(
          "~/Scripts/external/XXXXConfig-{version}.js",
          "~/Scripts/external/Views/Product/ProductFavorite-{version}.js"));
  </code></pre>
  
  <p>My expectation is that if there were two files in that directory:</p>
  
  <ol>
  <li>XXXXConfig-1.0.0.js </li>
  <li>XXXXConfig-1.0.1.js</li>
  </ol>
  
  <p>That it would only include the latest version, i.e., XXXXConfig-1.0.1.js. Instead it is bundling BOTH together, which causes the system to fail spectacularly.</p>
  
  <p>My expectation comes from <a href="https://docs.microsoft.com/en-us/aspnet/mvc/overview/performance/bundling-and-minification#using-the--wildcard-character-to-select-files" rel="nofollow noreferrer">here</a>, and other sources. Is this expectation wrong? In any case, is there some way to make it so that it ONLY includes the latest version?</p>