[Mono-bugs] [Bug 666413] Subclassing Attributes, not being generated in Manifest...

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jan 22 17:58:05 EST 2011


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

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


Jonathan Pryor <jpryor at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jpryor at novell.com

--- Comment #1 from Jonathan Pryor <jpryor at novell.com> 2011-01-22 22:58:04 UTC ---
The problem here, fundamentally, is with profiles.

The user's assembly is built against the MonoDroid profile.

monodroid.exe is built against the .NET 3.5 profile.

Due to previous issues with using Reflection to load user assemblies +
Mono.Android.dll + etc. into monodroid.exe, we switched to using Cecil for the
IL analysis.  (Plus, we needed Cecil for linking.)

The problem is that Cecil doesn't load assemblies and execute code as
Reflection does; it loads the assemblies so that IL can be analyzed, but the IL
isn't ever executed, whereas with Reflection when you get an instance of a
custom attribute, you're getting an actual instance of a custom attribute
(which means that user code IS being executed in the reflector's AppDomain).

Because we're not using Reflection, no instances of e.g. C2dmReceiverAttribute
are actually constructed, the C2dmReceiverAttribute constructor is thus never
run, and thus the Permission property is never changed.

I will need to explore whether Reflection can be re-introduced to allow this to
work.

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


More information about the mono-bugs mailing list