diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/Resources/Strings.resx b/src/libraries/System.Runtime.Serialization.Formatters/src/Resources/Strings.resx index df3d7f431191555f7794a473663eecaffc742ccd..47c6bf98bed08ba6483a2b5c092fd7f3ea0ecb44 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/Resources/Strings.resx +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/Resources/Strings.resx @@ -249,4 +249,7 @@ BinaryFormatter serialization and deserialization are disabled within this application. See https://aka.ms/binaryformatter for more information. + + BinaryFormatter serialization and deserialization are not supported on this platform. See https://aka.ms/binaryformatter for more information. + diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.PlatformNotSupported.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.PlatformNotSupported.cs index 59970dabe4a6b121ec6454db1fee1aee59463513..1e194973e2629b72b7fb4cac04efb25e99b28b8a 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.PlatformNotSupported.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatter.PlatformNotSupported.cs @@ -11,11 +11,11 @@ public sealed partial class BinaryFormatter : IFormatter [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresUnreferencedCode(IFormatter.RequiresUnreferencedCodeMessage)] public object Deserialize(Stream serializationStream) - => throw new PlatformNotSupportedException(SR.BinaryFormatter_SerializationDisallowed); + => throw new PlatformNotSupportedException(SR.BinaryFormatter_SerializationNotSupportedOnThisPlatform); [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [RequiresUnreferencedCode(IFormatter.RequiresUnreferencedCodeMessage)] public void Serialize(Stream serializationStream, object graph) - => throw new PlatformNotSupportedException(SR.BinaryFormatter_SerializationDisallowed); + => throw new PlatformNotSupportedException(SR.BinaryFormatter_SerializationNotSupportedOnThisPlatform); } }