Hey Chris,

That's pretty neat.

Last time I heard, MonoTouch and Mono for Android were still using the steps in:

https://github.com/mono/mono/tree/master/mcs/tools/tuner/Mono.Tuner

Including the ApplyPreserveAttribute that does something similar.

Jb

On Thu, Aug 16, 2012 at 5:39 AM, Chris Chambers
<[email protected]> wrote:
> My work is currently using the mono linker to strip unused things from some
> executables we produce. Several methods/classes are only used through
> Reflection, and so get stripped when we don't want them to. I've produced an
> additional step that prevents anything with a '[UsedImplicitly]' attribute
> on it from getting removed (we already use this attribute to prevent
> ReSharper from complaining about unused things, so this solution for us is
> far easier than using the XML option to prevent the strip)
>
> I doubt that this is generic enough to go into the mono linker (it uses
> JetBrains.Annotations.UsedImplicitly as the only attribute it is looking for
> at the moment) but it might be useful for some other people using the
> linker. The GitHub repo with instructions is here:
>
> https://github.com/krijesta/mono-linker-UsedImplicitly
>
> Cheers,
>
> Chris
>
> --
> --
> mono-cecil

-- 
--
mono-cecil

Reply via email to