asp.net-mvc – MVC 5 Bundle错误

我有一个很大的问题.我创建了一个MVC 5项目,我无法使用代码启动它.问题在于捆绑.它在Global.asax.cs / Application_Start方法中,在BundleConfig.RegisterBundles(BundleTable.Bundles)上停止;线.
它说“Method not found:’!! 0 [] System.Array.Empty()’.” (system.missingMethodException而).

这是BundleConfig.cs代码(认):

public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.validate*"));

            // 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.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js","~/Scripts/respond.js"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css","~/Content/site.css"));
        }

我正在使用VS 2015 Preview.我应该怎么做/改变?

谢谢!

解决方法

正如Mrchief在评论中所说的,问题是由于针对.NET 4.6的编译,但它不是一个错误:如果您选择,您可以在服务器上部署4.6 RC运行时.如果您在Azure中运行,则在4.6正式发布(即不是RC)之前,此选项可能不可用.

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 07001

现在最安全的是不要针对4.6,除非你真的需要它.

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....