Bug 42138 - Assembly.LoadWithPartialName() insists on having the disk file, but does not use it.
Summary: Assembly.LoadWithPartialName() insists on having the disk file, but does not ...
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: Tools (show other bugs)
Version: 4.2.0 (C6)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-06-24 00:20 UTC by Hin-Tak Leung
Modified: 2016-09-14 23:06 UTC (History)
4 users (show)

Tags:
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 for Bug 42138 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Hin-Tak Leung 2016-06-24 00:20:46 UTC
On hind-sight it is not surprising, but still. I found that "ass = Assembly.LoadWithPartialName ("mono-webkit");"

in 
https://github.com/mono/mono/blob/master/mcs/class/Mono.WebBrowser/Mono.WebBrowser/Manager.cs

insists that I provide a disk file in MONO_PATH, but the disk file gets ignored and used it own in-memory copy within a mkbundle bundle.

Of course it is partly my own fault that the two versions differ. I made it that way to take advantage of the dependency scanning, found that it does not work as planned so started making changes.

There are two surprises:

- although I included a "mono-webkit.dll" with the mkbundle, the runtime still insists that it needs a disk file.

- and the disk file does not get used, instead the runtime uses the in-memory copy of the dll. (when the two differ).


I know Assembly.LoadWithPartialName is obsolete for exactly this sort of inconsistent behavior, but it is still confusing.
Comment 1 Rodrigo Kumpera 2016-09-14 22:04:33 UTC
Mono.WebBrowser should be fixed to load things properly.

Did you try to compile it yourself and change it to use a non-deprecated  Load function?
Comment 2 Hin-Tak Leung 2016-09-14 22:23:20 UTC
No, I did not try to modify the code. What would be a non-deprecated alternative?
Comment 3 Rodrigo Kumpera 2016-09-14 23:06:03 UTC
Load or LoadFrom