Bug 41485 - Assembly Name cause it not to load
Summary: Assembly Name cause it not to load
Status: RESOLVED ANSWERED
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: 4.2.0 (C6)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2016-06-03 15:28 UTC by Howard Glenn Inman
Modified: 2016-06-09 18:51 UTC (History)
3 users (show)

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


Attachments
This is the assembly you have requsted. I have a simular issue with an assembly 'SunNuclear.Device.HAL.Utility (63.33 KB, application/x-zip-compressed)
2016-06-06 13:25 UTC, Howard Glenn Inman
Details


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:
Status:
RESOLVED ANSWERED

Description Howard Glenn Inman 2016-06-03 15:28:15 UTC
Assembly ass = typeof(SunNuclear.Device.HAL.Exceptions.HalException).Assembly;
            AssemblyName[] assNames = ass.GetReferencedAssemblies();

            foreach(AssemblyName name in assNames)
            {
                AddLine(name.FullName);
            }


System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'SunNuclear.Device.HAL.Exceptions, Version=3.2.0.2216, Culture=neutral, PublicKeyToken=null'
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) <0x41119b90 + 0x00065> in <filename unknown>:0 
  at System.Windows.Forms.Button.OnClick (System.EventArgs e) <0x41119b10 + 0x00053> in <filename unknown>:0 
  at System.Windows.Forms.ButtonBase.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) <0x41119700 + 0x000ff> in <filename unknown>:0 
  at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) <0x411196d0 + 0x00013> in <filename unknown>:0 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) <0x41119480 + 0x00118> in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x410b7cc0 + 0x00217> in <filename unknown>:0 
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) <0x410ed270 + 0x00073> in <filename unknown>:0 
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) <0x410ed240 + 0x00013> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x410b7c90 + 0x00024> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x410b7c50 + 0x00036> in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x410b6590 + 0x0031c> in <filename unknown>:0 

However if I just rename the DLL (And Name Space) to HalException then it works fine

            Assembly ass = typeof(SunNuclear.Device.HAL.HalExceptions.HalException).Assembly;
            AssemblyName[] assNames = ass.GetReferencedAssemblies();

            foreach(AssemblyName name in assNames)
            {
                AddLine(name.FullName);
            }
Comment 1 Howard Glenn Inman 2016-06-03 15:29:19 UTC
Assembly ass = typeof(SunNuclear.Device.HAL.Exceptions.Exception).Assembly;
            AssemblyName[] assNames = ass.GetReferencedAssemblies();

            foreach(AssemblyName name in assNames)
            {
                AddLine(name.FullName);
            }

The first Snippet should read as above
Comment 2 Marek Safar 2016-06-06 09:08:16 UTC
Could you attach an assembly with 'SunNuclear.Device.HAL.Exceptions.Exception' type?
Comment 3 Howard Glenn Inman 2016-06-06 13:25:06 UTC
Created attachment 16200 [details]
This is the assembly you have requsted. I have a simular issue with an assembly 'SunNuclear.Device.HAL.Utility

This is the requested assembly, also with the calling application. All it does is create a reference.

        private void button1_Click(object sender, EventArgs e)
        {
           SunNuclear.Device.HAL.Exceptions.CommException ex = null;
        }
Comment 4 Marek Safar 2016-06-09 16:12:46 UTC
I cannot reproduce it and there does not appear to be anything special on that assembly except it's using upper case .DLL suffix.

Are you running the app on case sensitive file system?
Comment 5 Howard Glenn Inman 2016-06-09 16:17:01 UTC
Yes I am actually. I will look into that issue

thank you

Glenn
Comment 6 Howard Glenn Inman 2016-06-09 17:00:26 UTC
Just as a note, Ubuntu does not have a non-sensitive option.

Glenn
Comment 7 Howard Glenn Inman 2016-06-09 18:24:53 UTC
Confirmed
the DLL is the issue, rename to dll solves the problem reported
could it not check both :)

Thank you for your assistance

Glenn Innman