Add feature switch to disable custom .resources reader support (UserResourceSet) #45272
Labels
area-System.Resources
enhancement
Product code improvement that does NOT require public API changes/additions
linkable-framework
Issues associated with delivering a linker friendly framework
size-reduction
Issues impacting final app size primary for size sensitive workloads
Milestone
Support for external custom resource-set types seems to be very advanced and possibly never used feature in practice. It makes trimming very complicated and brings large unnecessary dependencies as well as opens doors for potential security problems. The idea would be to add a new feature switch to block setting mediator.UserResourceSet and validate that .resources files require only
System.Resources.RuntimeResourceSet
andSystem.Resources.ResourceReader
which I suspect all netcore apps use anyway.Effectively replacing CreateResourceSet with
This would have two effects
The feature switch would also help with size trimming work a lot because it would allow propagating the information that we are dealing with
RuntimeResourceSet
only everywhere. In practice removing, for example, all code in ResourceReader which handles non-_ums
code paths (including Unicode encoding dependency, etc).@eerhardt @vitek-karas
The text was updated successfully, but these errors were encountered: