我用VS2015RC和MVC模板创建了一个新的应用程序,没有修改任何代码行,我有这个错误:
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
这是第一次发生在我身上,所以我被困在这一刻
发布于 2015-08-18 23:00:13
我在生产服务器上遇到过这种情况,而在开发机器上一切正常。
在目标计算机上安装.NET Framework4.6已修复此问题。
发布于 2016-02-12 17:22:06
很抱歉来晚了,但如果其他人通过TeamCity构建得到了这个问题,我可以描述我们必须做的事情。
我们的构建服务器(但不是应用服务器)上安装了SLN4.6,RunnerType是Visual Studio ( .NET ),Visual Studio选项设置为2015。
这迫使构建使用4.6,我需要将Visual Studio选项更改为2013,以强制构建使用4.5.2
发布于 2017-05-18 01:27:54
我尝试了这些解决方案,但没有成功。
我的解决方案是转到应用程序池,转到2.0,在浏览器上执行站点,看到错误(因为版本是错误的),然后返回4.0,然后“瞧”,我打开了网站。
https://stackoverflow.com/questions/31253747
复制相似问题