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)

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


Attachments

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

Note You need to log in before you can comment on or make changes to this bug.