[Mono-bugs] [Bug 654559] Assembly.Location only returns the name

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 18 11:17:44 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=654559

https://bugzilla.novell.com/show_bug.cgi?id=654559#c1


Jonathan Pryor <jpryor at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jpryor at novell.com
         Resolution|                            |WONTFIX

--- Comment #1 from Jonathan Pryor <jpryor at novell.com> 2010-11-18 16:17:43 UTC ---
As of Preview 7, there is no Assembly location:

  http://monodroid.net/Releases/Previews/Preview_7#Packaging_Changes

Specifically:

  Assemblies are now stored uncompressed within the .apk and loaded 
  from the .apk during app startup.

For the more technically inclined, this is done via open(2), mmap(2), and
mono_register_bundled_assemblies().

In short, there is no directory to return, as the assemblies to not exist as
distinct filesystem entries.

My guess is that you want the assembly location in order to follow:

  http://www.mono-project.com/Guidelines:Application_Deployment

and use assembly-relative filesystem paths.  This cannot work on Android, as
you (the developer) do not fully control the app's directory layout.  For
example, files you create should be $APPDIR/files or $APPDIR/cache (etc.), BUT
the actual value of "files" or "cache" is UNDOCUMENTED; you get these via e.g.
ContextWrapper.FilesDir [0] or ContextWrapper.CacheDir [1], and the actual
filesystem name could change at ~any time (especially considering that any
hardware manufacturer could change these values at will...).

Add to that the fact that you can't have files extracted at install time (that
I could find, and I looked a lot), and things get annoying, fast.

So, we theoretically could modify Assembly.Location to return the assembly name
encoded within the .apk, e.g.
"/data/app/YOUR.APP-1.apk#assemblies/mscorlib.dll", but because of the above I
don't see how this would be at all useful, as you'd need
/data/data/YOUR.APP/... for actually useful filesystem paths, and the subdir
names could be different, and modifying Assembly.Location may not actually be
possible.

[0]
http://docs.monodroid.net/index.aspx?link=P:Android.Content.ContextWrapper.FilesDir
[1]
http://docs.monodroid.net/index.aspx?link=P:Android.Content.ContextWrapper.CacheDir

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list