-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: SYSLIB0013 warning | ||
description: Learn about the EscapeUriString obsoletion that generates compile-time warning SYSLIB0013. | ||
ms.topic: reference | ||
ms.date: 04/24/2021 | ||
--- | ||
# SYSLIB0013: EscapeUriString is obsolete | ||
|
||
The <xref:System.Uri.EscapeUriString(System.String)?displayProperty=nameWithType> API is marked as obsolete, starting in .NET 6. Using it in code generates warning `SYSLIB0013` at compile time. | ||
|
||
<xref:System.Uri.EscapeUriString(System.String)?displayProperty=nameWithType> can corrupt the Uri string in some cases. | ||
|
||
For more information, see <https://github.com/dotnet/runtime/issues/31387>. | ||
|
||
## Workarounds | ||
|
||
Use <xref:System.Uri.EscapeDataString(System.String)?displayProperty=nameWithType> for query string components instead. | ||
|
||
[!INCLUDE [suppress-syslib-warning](../../../../includes/suppress-syslib-warning.md)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: SYSLIB0014 warning | ||
description: Learn about the System.Net obsoletions that generate compile-time warning SYSLIB0014. | ||
ms.topic: reference | ||
ms.date: 04/24/2021 | ||
--- | ||
# SYSLIB0014: WebRequest, HttpWebRequest, ServicePoint, WebClient are obsolete | ||
|
||
The following APIs are marked as obsolete, starting in .NET 6. Using them in code generates warning `SYSLIB0014` at compile time. | ||
|
||
- <xref:System.Net.WebRequest?displayProperty=fullName> | ||
- <xref:System.Net.HttpWebRequest?displayProperty=fullName> | ||
- <xref:System.Net.ServicePoint?displayProperty=fullName> | ||
- <xref:System.Net.WebClient?displayProperty=fullName> | ||
|
||
## Workarounds | ||
|
||
Use <xref:System.Net.Http.HttpClient> instead. | ||
|
||
[!INCLUDE [suppress-syslib-warning](../../../../includes/suppress-syslib-warning.md)] | ||
|
||
## See also | ||
|
||
- [WebRequest, WebClient, and ServicePoint are obsolete](../networking/6.0/webrequest-deprecated.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: SYSLIB0015 warning | ||
description: Learn about the obsoletion of DisablePrivateReflectionAttribute that generates compile-time warning SYSLIB0015. | ||
ms.topic: reference | ||
ms.date: 04/24/2021 | ||
--- | ||
# SYSLIB0015: DisablePrivateReflectionAttribute is obsolete | ||
|
||
Starting in .NET 6, the <xref:System.Runtime.CompilerServices.DisablePrivateReflectionAttribute?displayProperty=nameWithType> type is marked as obsolete. This attribute has no effect in .NET Core 2.1 and later apps. Using it in code generates warning `SYSLIB0015` at compile time for .NET 6 and later apps. | ||
|
||
For more information, see <https://github.com/dotnet/runtime/issues/11811>. | ||
|
||
## Workarounds | ||
|
||
None. | ||
|
||
[!INCLUDE [suppress-syslib-warning](../../../../includes/suppress-syslib-warning.md)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: SYSLIB0016 warning | ||
description: Learn about the GetContextInfo obsoletion that generates compile-time warning SYSLIB0016. | ||
ms.topic: reference | ||
ms.date: 04/24/2021 | ||
--- | ||
# SYSLIB0016: GetContextInfo() is obsolete | ||
|
||
The <xref:System.Drawing.Graphics.GetContextInfo?displayProperty=nameWithType> method that takes no arguments is marked as obsolete, starting in .NET 6. Using it in code generates warning `SYSLIB0016` at compile time. | ||
|
||
For more information, see <https://github.com/dotnet/runtime/issues/47880>. | ||
|
||
## Workarounds | ||
|
||
For better performance and fewer allocations, use the <xref:System.Drawing.Graphics.GetContextInfo%2A?displayProperty=nameWithType> overloads that accept arguments. | ||
|
||
[!INCLUDE [suppress-syslib-warning](../../../../includes/suppress-syslib-warning.md)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: SYSLIB0019 warning | ||
description: Learn about the RuntimeEnvironment obsoletions that generate compile-time warning SYSLIB0019. | ||
ms.topic: reference | ||
ms.date: 04/24/2021 | ||
--- | ||
# SYSLIB0019: Some RuntimeEnvironment APIs are obsolete | ||
|
||
The following APIs are marked as obsolete, starting in .NET 6. Using them in code generates warning `SYSLIB0019` at compile time. | ||
|
||
- <xref:System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile?displayProperty=nameWithType> property | ||
- <xref:System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(System.Guid,System.Guid)?displayProperty=nameWithType> method | ||
- <xref:System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsObject(System.Guid,System.Guid)?displayProperty=nameWithType> method | ||
|
||
These APIs always throw a <xref:System.PlatformNotSupportedException> at run time. | ||
|
||
## Workarounds | ||
|
||
None. | ||
|
||
[!INCLUDE [suppress-syslib-warning](../../../../includes/suppress-syslib-warning.md)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: SYSLIB0020 warning | ||
description: Learn about the IgnoreNullValues obsoletion that generates compile-time warning SYSLIB0020. | ||
ms.topic: reference | ||
ms.date: 04/24/2021 | ||
--- | ||
# SYSLIB0020: IgnoreNullValues is obsolete | ||
|
||
The <xref:System.Text.Json.JsonSerializerOptions.IgnoreNullValues?displayProperty=nameWithType> property is marked as obsolete, starting in .NET 6. Using it in code generates warning `SYSLIB0020` at compile time. | ||
|
||
## Workarounds | ||
|
||
To ignore null values when serializing, set <xref:System.Text.Json.JsonSerializerOptions.DefaultIgnoreCondition> to <xref:System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull?displayProperty=nameWithType>. For more information, see <https://github.com/dotnet/runtime/issues/39152>. | ||
|
||
[!INCLUDE [suppress-syslib-warning](../../../../includes/suppress-syslib-warning.md)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters