Skip to content

Commit 2e9b69c

Browse files
authored
Update NotSupportedException for BinaryFormatter (de)serialize (#8992)
1 parent 9a5badc commit 2e9b69c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
</Attributes>
7373
<Docs>
7474
<summary>Serializes and deserializes an object, or an entire graph of connected objects, in binary format.</summary>
75-
<remarks>Warning: BinaryFormatter is insecure and can't be made secure. For more information, see the <see href="/dotnet/standard/serialization/binaryformatter-security-guide">BinaryFormatter security guide</see> and <see href="/previous-versions/dotnet/fundamentals/serialization/binary/system-runtime-serialization-formatters-binary-binaryformatter">System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class</see>.</remarks>
75+
<remarks>Warning: BinaryFormatter is insecure and can't be made secure. For more information, see the <see href="/dotnet/standard/serialization/binaryformatter-security-guide">BinaryFormatter security guide</see>. The in-box implementation of BinaryFormatter was removed in .NET 9. For more information, see <see href="/dotnet/standard/serialization/binaryformatter-migration-guide/">BinaryFormatter migration guide</see>.</remarks>
7676
</Docs>
7777
<Members>
7878
<MemberGroup MemberName=".ctor">
@@ -132,7 +132,6 @@ This constructor sets the properties of the <xref:System.Runtime.Serialization.F
132132
|-------------------|---------------|
133133
|<xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.SurrogateSelector%2A>|`null`|
134134
|<xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Context%2A>|A <xref:System.Runtime.Serialization.StreamingContext> with a value that indicates that serialized data can be transmitted to or received from any of the other contexts. (<xref:System.Runtime.Serialization.StreamingContextStates.All?displayProperty=nameWithType>)|
135-
136135
]]></format>
137136
</remarks>
138137
</Docs>
@@ -460,7 +459,8 @@ An error occurred while deserializing an object from the input stream.
460459

461460
The <see langword="InnerException" /> property may contain more information about the root cause.</exception>
462461
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
463-
<exception cref="T:System.NotSupportedException">ASP.NET Core 5 and later: Always thrown unless <see cref="T:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter" /> functionality is re-enabled in the project file. For more information, see <see href="https://aka.ms/binaryformatter">Resolving BinaryFormatter obsoletion and disablement errors</see>.</exception>
462+
<exception cref="T:System.NotSupportedException">ASP.NET Core 5-8: Always thrown unless <see cref="T:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter" /> functionality is re-enabled in the project file. For more information, see <see href="https://aka.ms/binaryformatter">Resolving BinaryFormatter obsoletion and disablement errors</see>.</exception>
463+
<exception cref="T:System.PlatformNotSupportedException">.NET 9 and later versions: In all cases. For more information, see <see href="https://learn.microsoft.com/dotnet/standard/serialization/binaryformatter-migration-guide/">BinaryFormatter migration guide</see>.</exception>
464464
</Docs>
465465
</Member>
466466
<Member MemberName="Deserialize">
@@ -635,7 +635,6 @@ For deserialization to succeed, the current position in the stream must be at th
635635
636636
]]></format>
637637
</remarks>
638-
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/5dxse167(v=vs.100)">Automatic Deserialization in .NET Framework Remoting</related>
639638
</Docs>
640639
</Member>
641640
<MemberGroup MemberName="Serialize">
@@ -730,7 +729,8 @@ For deserialization to succeed, the current position in the stream must be at th
730729
The <paramref name="graph" /> is null.</exception>
731730
<exception cref="T:System.Runtime.Serialization.SerializationException">An error has occurred during serialization, such as if an object in the <paramref name="graph" /> parameter is not marked as serializable.</exception>
732731
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
733-
<exception cref="T:System.NotSupportedException">ASP.NET Core 5 and later: Always thrown unless <see cref="T:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter" /> functionality is re-enabled in the project file. For more information, see <see href="https://aka.ms/binaryformatter">Resolving BinaryFormatter obsoletion and disablement errors</see>.</exception>
732+
<exception cref="T:System.NotSupportedException">ASP.NET Core 5-8: Always thrown unless <see cref="T:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter" /> functionality is re-enabled in the project file. For more information, see <see href="https://aka.ms/binaryformatter">Resolving BinaryFormatter obsoletion and disablement errors</see>.</exception>
733+
<exception cref="T:System.PlatformNotSupportedException">.NET 9 and later versions: In all cases. For more information, see <see href="https://learn.microsoft.com/dotnet/standard/serialization/binaryformatter-migration-guide/">BinaryFormatter migration guide</see>.</exception>
734734
</Docs>
735735
</Member>
736736
<Member MemberName="Serialize">

0 commit comments

Comments
 (0)