title: Unable to bundle file in the format 'jquery.plugin.{version}.min.js'
body: <p>I am using the code below to try and bundle a pre-minified version of the jQuery <code>simpleModal</code> plugin in an ASP.NET MVC4 project:</p>
  
  <pre><code>public static void RegisterBundles(BundleCollection bundles)
  {
      AddDefaultIgnorePatterns(bundles.IgnoreList);
  
      bundles.Add(new ScriptBundle("~/ModalBundle").Include("~/Scripts/jquery.simplemodal.{version}.min.js"));
  }
  </code></pre>
  
  <p>where <code>AddDefaultIgnorePatterns()</code> is defined as per <a href="https://stackoverflow.com/a/12569908/504477">ASP.NET MVC 4 ScriptBundle returns empty</a>:</p>
  
  <pre><code>public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
  {
      if (ignoreList == null)
          throw new ArgumentNullException("ignoreList");
  
      ignoreList.Clear();
  
      ignoreList.Ignore("*.intellisense.js");
      ignoreList.Ignore("*-vsdoc.js");
      ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
      //ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
      ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
  }
  </code></pre>
  
  <p>Unfortunately, the requested resource is never included when rendered using <code>@Scripts.Render()</code> after being registered in <code>Application_Start()</code>.</p>
  
  <p>The following combinations <em>do</em> seem to work, but where possible I did not want to have to change the file name across a large number of projects:</p>
  
  <ul>
  <li><code>jquery.simplemodal.1.2.3.min.js</code> <em>(exact version match)</em></li>
  <li><code>jquery.simplemodal.{version}.js</code> <em>(removal of '.min', with corresponding file rename)</em></li>
  </ul>
  
  <p>The following <em>do not</em> work:</p>
  
  <ul>
  <li><code>jquery.simplemodal-{version}.min.js</code> <em>(hyphen before version, with corresponding file rename)</em></li>
  <li><code>jquery.simplemodal*</code> <em>(loose wildcard, which is very suspicious)</em></li>
  </ul>
  
  <p>I have verified that the file definitely exists in the expected location, but must be missing something else fundamental. None of my other script or style bundles suffer from this problem. Any ideas?</p>