Open
Description
SerializationGuard logic is still used even if EnableUnsafeBinaryFormatterSerialization feature is disabled via feature switch. This brings unnecessary dependencies for size sensitive workloads.
Ideally, code like
- https://github.com/dotnet/runtime/blob/master/src/libraries/Common/src/System/Runtime/Serialization/SerializationGuard.cs
- https://github.com/dotnet/runtime/blob/master/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.SerializationGuard.cs
would be completely removed as well