Quantcast
Viewing all articles
Browse latest Browse all 204402

Custom PreserveAttribute not working.

I've read here that you can create your own custom PreserveAttribute and use it everywhere and the linker will "JUST WORK"™, not removing the annotated class or anything.

"The linker share code across products so (to make it easier*) it does not care about its namespace. IOW you can define your own [Preserve] attribute, inside your own code base, and remove the #if #elif #end related conditions in all other files.

  • In fact that's how the original (open source) monolinker works. It check for [Preserve] when nothing from Mono's BCL provides such an attribute."

I've tried creating my own PreserveAttribute but the linker is not behaving like stated, it just keeps removing the classes I sign with my custom attribute.

Any suggestions?


Viewing all articles
Browse latest Browse all 204402

Trending Articles