I have a big problem. I created an MVC 5 project and I cannot start it with default code. The problem is with the bundling. It stops in the Global.asax.cs/Application_Start method, on the BundleConfig.RegisterBundles(BundleTable.Bundles); line. It says "Method not found: '!!0[] System.Array.Empty()'." (System.MissingMethodException).

Here is the BundleConfig.cs code (default):

public static void RegisterBundles(BundleCollection bundles)


            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.



I'm using VS 2015 Preview. What should I do/change?



As Mrchief says in the comments, the problem is due to compiling against .NET 4.6, but it's not a bug: you can deploy the 4.6 RC runtime on your server if you choose to. If you're running in Azure, this option will probably not be available until 4.6 is officially released (i.e. not RC).

From http://blogs.msdn.com/b/dotnet/archive/2015/05/08/targeting-the-net-framework-4-6-rc.aspx:

your app will require the .NET Framework 4.6 (or later) to run. You will need to deploy the .NET Framework 4.6 RC

Safest for now is to not target 4.6 unless you really need it.


This will occur if .NET 4.6 is not installed on the server. If you have your own web server (not Azure), you may get the installer here. Note - don't confuse the targeting pack with the actual .NET installer.

Your Answer

