You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the problem with this feature is primarily because of reflection. First, if there are any trim warnings anywhere in the app, the trimmer cannot guarantee that such usage is safe. In addition, to scan for usage by reflection, every line in every library in the app would have to be scanned, just in case reflection is used against the target library. This could be very slow, and while that may be acceptable for trimming a whole app, trimming just one or two libraries in the app would make this unacceptable.
In order to make this safe, reflection would have to be disallowed against the target library. Unfortunately, because many serializers in the ecosystem use reflection, this would prohibit using any types from the library in any serializer, or often loggers, anywhere in the app.
The idea here is to allow the linker to run and trim nothing except for certain assemblies that have opted-in to being always trimmed.
The text was updated successfully, but these errors were encountered: