Closed
Description
Some types are inherently not trim compatible. Take, for example, BinaryFormatter
. Virtually anything you do with the type is not going to be trim compatible.
Today, we only allow RequiresUnreferencedCodeAttribute
on methods and constructors.
When trying to annotate the implementation of BinaryFormatter
, it is causing almost every method in the library to be marked as RequiresUnreferencedCode
. This is a lot of changes when just putting the attribute on a whole class would be a lot easier.
We should change the ILLinker to support RequiresUnreferencedCodeAttribute
on classes and structs, and possibly interfaces.