xamarin-macios icon indicating copy to clipboard operation
xamarin-macios copied to clipboard

Obsolete PreserveAttribute

Open marek-safar opened this issue 5 years ago • 0 comments

The attribute is not needed in .NET6 and can interfere with official .NET linker attributes. The linker is able to recognize and mark reflection patterns automatically and for custom scenarios better attribute is supported https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.dynamicdependencyattribute. The assembly-level attribute handling is not needed either as that's the default .net6 behavior.

We'll need to update the generator to not generate the Preserve attribute first: https://github.com/xamarin/xamarin-macios/issues/19524

marek-safar avatar Feb 26 '21 08:02 marek-safar