Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
179 views
in Technique[技术] by (71.8m points)

c# - Method not found: '!!0[] System.Array.Empty()'

I created a new app with VS 2015 RC and the MVC template and without modifying any line of code I have this error:

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:ProyectosSAASAppSAASAppApp_StartBundleConfig.cs:29
   SAASApp.MvcApplication.Application_Start() in C:ProyectosSAASAppSAASAppGlobal.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

First time it happens to me, so I am stuck at the moment

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I had this situation on the production server while on development machine everything was OK.

Installing .NET Framework 4.6 on the target machine has fixed the problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...