I had the same problem and found a fix. I noticed that if I used the jquery file version number instead of the {version} token, which worked fine to use it in bundling / minification. The problem was that it did not replace the {version} token, and then could not pull the jquery file into the package.
It seems that the System.Web.Optimization dll is responsible for converting the {version} token into the package configuration. I ended up using NuGet to update this dll. I also just updated everything related to MVC dll when I was on it (Razor, MVC, web pages, etc.). After that he worked.
You can find out if this is your problem by separating the steps of creating and adding packages to the package configuration. The new package object. put a breakpoint on it. Run the Include method, then execute the add method in the bundle configuration to add a new package. When you enter a package, you can look inside it after it executes the Include method to see if the Item property increases accordingly. It did not increase for me when it was a problem.
Also, the link for switching to MVC 5 from MVC 4 is very well made here. I had some work to update all my assembly links after updating the NuGet packages.
http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and- web-api-2
ASP.NET: This method cannot be called during the initialization phase before launching the application.
source share