首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >找不到方法:'!!0[] System.Array.Empty()‘

找不到方法:'!!0[] System.Array.Empty()‘
EN

Stack Overflow用户
提问于 2015-07-07 03:10:39
回答 6查看 95.6K关注 0票数 131

我用VS2015RC和MVC模板创建了一个新的应用程序,没有修改任何代码行,我有这个错误:

代码语言:javascript
复制
Method not found: '!!0[] System.Array.Empty()'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.]
   SAASApp.BundleConfig.RegisterBundles(BundleCollection bundles) in C:\Proyectos\SAASApp\SAASApp\App_Start\BundleConfig.cs:29
   SAASApp.MvcApplication.Application_Start() in C:\Proyectos\SAASApp\SAASApp\Global.asax.cs:18

[HttpException (0x80004005): Method not found: '!!0[] System.Array.Empty()'.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +483
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +176
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +350
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +305

[HttpException (0x80004005): Method not found: '!!0[] System.Array.Empty()'.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +661
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +96
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +189

这是第一次发生在我身上,所以我被困在这一刻

EN

回答 6

Stack Overflow用户

回答已采纳

发布于 2015-08-18 23:00:13

我在生产服务器上遇到过这种情况,而在开发机器上一切正常。

在目标计算机上安装.NET Framework4.6已修复此问题。

票数 242
EN

Stack Overflow用户

发布于 2016-02-12 17:22:06

很抱歉来晚了,但如果其他人通过TeamCity构建得到了这个问题,我可以描述我们必须做的事情。

我们的构建服务器(但不是应用服务器)上安装了SLN4.6,RunnerType是Visual Studio ( .NET ),Visual Studio选项设置为2015。

这迫使构建使用4.6,我需要将Visual Studio选项更改为2013,以强制构建使用4.5.2

票数 28
EN

Stack Overflow用户

发布于 2017-05-18 01:27:54

我尝试了这些解决方案,但没有成功。

我的解决方案是转到应用程序池,转到2.0,在浏览器上执行站点,看到错误(因为版本是错误的),然后返回4.0,然后“瞧”,我打开了网站。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31253747

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档