Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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
Developer Community or GitHub 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.
Created attachment 21283 [details]
Project demonstrating the the location doesn't exist
If I call Assembly.Location in a release mode app (not a shared runtime), the paths it returns do no reference real files.
For example: typeof (object).Assembly.Location == "mscorlib.dll"
This is in contrast to debug (shared runtime) builds which produce a valid path:
I have attached a project that demonstrates this discrepancy.
This is not something we wish to support.
Android .apk files have no mechanism or facility to have files extracted from the .apk at install time (*except* for native libraries, and even that is changing).
The only way we could have actual files for e.g. mscorlib.dll is if we had startup code to copy the files out of the .apk onto the disk during process startup. We actually did this before Preview 5 , and the startup overhead was significant. (Unfortunately, no commit message I can easily dig up actually mentions what that overhead was, but I remember it as being "bad.")
(Preview 5 took a different approach and just named all the assemblies as e.g. `libmscorlib.dll.so`, so that they'd be extracted. It was glorious! It was also deemed an incredible hack, could break without notice if Google ever used anything *other* than a file glob for library extraction, and was replaced in Preview 7 with the current infrastructure. Additionally, since Google is now looking into ways of *not* extracting native libraries from .apk files, such an idea wouldn't continue working forever.)