asp.net-mvc – MVC 5 Bundle错误
|
我有一个很大的问题.我创建了一个MVC 5项目,我无法使用默认代码启动它.问题在于捆绑.它在Global.asax.cs / Application_Start方法中,在BundleConfig.RegisterBundles(BundleTable.Bundles)上停止;线.
这是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:
现在最安全的是不要针对4.6,除非你真的需要它. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net-mvc – Telerik mvc grid,columns.bound to dictio
- ASP.NET Core Web API模板中没有单独的用户帐户auth选项
- asp.net – Request.Url.AbsoluteUri和重写的URL
- 如何在asp.net用户控件中使用jQuery ajax?
- asp.net – 适用于多个用户的EWS通知中心
- ASP.NET MVC:什么时候设置Thread.CurrentThread.CurrentUI
- asp.net-mvc-3 – MVC3 / Razor:cshtml.Execute()’:找不
- asp.net – 如何打破VB.NET中的“if”块
- asp.net-mvc – MVC / Unity – 如何将依赖项注入自定义Fil
- asp.net – 强制IIS快速到经典管道模式
