From 9d70c08ffaefdd9e681cb06b76ee32c3238b04d7 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Fri, 14 Aug 2020 15:46:36 -0700 Subject: [PATCH] Fixes #19723 --- docs/core/compatibility/3.1-5.0.md | 8 ++++ docs/core/compatibility/networking.md | 7 ++++ ...ulticastoption-group-doesnt-accept-null.md | 37 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 includes/core-changes/networking/5.0/multicastoption-group-doesnt-accept-null.md diff --git a/docs/core/compatibility/3.1-5.0.md b/docs/core/compatibility/3.1-5.0.md index f8e55adf05266..1c4702b702b62 100644 --- a/docs/core/compatibility/3.1-5.0.md +++ b/docs/core/compatibility/3.1-5.0.md @@ -204,6 +204,14 @@ If you're migrating from version 3.1 of .NET Core, ASP.NET Core, or EF Core to v *** +## Networking + +- [MulticastOption.Group doesn't accept a null value](#multicastoptiongroup-doesnt-accept-a-null-value) + +[!INCLUDE [multicastoption-group-doesnt-accept-null](../../../includes/core-changes/networking/5.0/multicastoption-group-doesnt-accept-null.md)] + +*** + ## Serialization - [BinaryFormatter.Deserialize rewraps some exceptions in SerializationException](#binaryformatterdeserialize-rewraps-some-exceptions-in-serializationexception) diff --git a/docs/core/compatibility/networking.md b/docs/core/compatibility/networking.md index 1336041f9668e..e537e615d6658 100644 --- a/docs/core/compatibility/networking.md +++ b/docs/core/compatibility/networking.md @@ -9,9 +9,16 @@ The following breaking changes are documented on this page: | Breaking change | Introduced version | | - | - | +| [MulticastOption.Group doesn't accept a null value](#multicastoptiongroup-doesnt-accept-a-null-value) | 5.0 | | [Default value of HttpRequestMessage.Version changed to 1.1](#default-value-of-httprequestmessageversion-changed-to-11) | 3.0 | | [WebClient.CancelAsync doesn't always cancel immediately](#webclientcancelasync-doesnt-always-cancel-immediately) | 2.0 | +## .NET 5.0 + +[!INCLUDE [multicastoption-group-doesnt-accept-null](../../../includes/core-changes/networking/5.0/multicastoption-group-doesnt-accept-null.md)] + +*** + ## .NET Core 3.0 [!INCLUDE[Default value of HttpRequestMessage.Version changed to 1.1](~/includes/core-changes/networking/3.0/httprequestmessage-version-change.md)] diff --git a/includes/core-changes/networking/5.0/multicastoption-group-doesnt-accept-null.md b/includes/core-changes/networking/5.0/multicastoption-group-doesnt-accept-null.md new file mode 100644 index 0000000000000..f1a9ebf52509b --- /dev/null +++ b/includes/core-changes/networking/5.0/multicastoption-group-doesnt-accept-null.md @@ -0,0 +1,37 @@ +### MulticastOption.Group doesn't accept a null value + + no longer accepts a value of `null`. If you set the property to `null`, an is thrown. + +#### Version introduced + +5.0 + +#### Change description + +In previous versions of .NET, you can set the property to `null`. If the is later passed to , the runtime throws a . + +In .NET 5.0 and later, an is thrown if you set the property to `null`. + +#### Reason for change + +To be consistent with the Framework Design Guidelines, the property has been updated to throw an if the value is `null`. + +#### Recommended action + +Make sure that you don't set to `null`. + +#### Category + +Networking + +#### Affected APIs + +- + +