Bug 42121 - Is there any other error that you can provide besides Array.Empty not found
Summary: Is there any other error that you can provide besides Array.Empty not found
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: 4.2.0 (C6)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2016-06-23 17:17 UTC by Howard Glenn Inman
Modified: 2016-07-04 11:12 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Howard Glenn Inman 2016-06-23 17:17:21 UTC
System.MissingMethodException: Method 'Array.Empty' not found.

No matter what issue I have, this is the only error I get. Often times it is nonsensical, I fill in a structure that implements an interface, I then pass it cast to that interface and Array.Empty Not Found.

if I Attempt to create a thread and (so it seems) set the thread name I get Array.Empty not Found

I have not gotten any error besides this, I have been researching porting part of our system to Linux, but I need more than this.

If you could help that would be awesome

I will be happy to provide Applications that cause this, in serval different circumstances

Thank you in advance

Glenn Inman
Comment 1 Howard Glenn Inman 2016-06-24 21:01:51 UTC
This code also provides the Array.Empty not found error

prot = (IProtocol_SNC)Activator.CreateInstance(GetType());
Comment 2 Howard Glenn Inman 2016-06-24 21:46:52 UTC
Please help
Every step of the way, I have to guess what the complaint is because all errors are Array.Empty not found, I am willing to change code to make it work both in mono and windows, but this is tedious. A little more guidance would be seriously appreciated. I begin to hunt the below, it is getting data from a class that is based on an interface. TO fix the previous issue (see Activator comment) took me 5 hours to track, then a few minutes to add to my derived classes individual create instance so I don't have to use activator.

Please help

Thank you

System.MissingMethodException: Method 'Array.Empty' not found.
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) <0x41734170 + 0x00065> in <filename unknown>:0 
  at System.Windows.Forms.Button.OnClick (System.EventArgs e) <0x417340f0 + 0x00053> in <filename unknown>:0 
  at System.Windows.Forms.ButtonBase.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) <0x41733ce0 + 0x000ff> in <filename unknown>:0 
  at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) <0x41733cb0 + 0x00013> in <filename unknown>:0 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) <0x41733a60 + 0x00118> in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x41689730 + 0x00217> in <filename unknown>:0 
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) <0x417068e0 + 0x00073> in <filename unknown>:0 
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) <0x417068b0 + 0x00013> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x41689700 + 0x00024> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x416896c0 + 0x00036> in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x41688000 + 0x0031c> in <filename unknown>:0
Comment 3 Marek Safar 2016-07-04 11:12:45 UTC
System.Array is .net 4.6 new method. You need to upgrade to mono which support .net 4.6  or use component which does not have this dependency.

Mono 4.4 should work