Skip to content

Commit 9cbd349

Browse files
Update ns-System.Drawing for supported apps (dotnet#5232)
1 parent 7c41424 commit 9cbd349

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

includes/drawing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
> [!CAUTION]
2-
> - The `System.Drawing` namespace is not recommended for new development, due to not being supported within a Windows or ASP.NET service and it is not cross-platform. [ImageSharp](https://github.com/SixLabors/ImageSharp) and [SkiaSharp](https://github.com/mono/SkiaSharp) are recommended as alternatives.
3-
> - On Windows, `System.Drawing` depends on the GDI+ native library, which is shipped as part of the OS. Some Windows SKUs, like Windows Server Core or Windows Nano, don't include this native library as part of the OS. Exceptions will be thrown at run time because the library can't be loaded.
2+
> - The `System.Drawing` namespace is not recommended for new development, because it's not supported within Windows services, ASP.NET Core, and ASP.NET. Attempting to use `System.Drawing` classes within one of these application types may result in run-time exceptions and diminished service performance. Recommended alternatives include [ImageSharp](https://github.com/SixLabors/ImageSharp), [SkiaSharp](https://github.com/mono/SkiaSharp), and [Windows Imaging Components](/windows/desktop/wic/-wic-about-windows-imaging-codec).
3+
> - On Windows, `System.Drawing` depends on the GDI+ native library, which is shipped as part of the OS. Some Windows SKUs, like Windows Server Core or Windows Nano, don't include this native library as part of the OS. Exceptions will be thrown at run time because the library can't be loaded.

xml/ns-System.Drawing.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Namespace Name="System.Drawing">
22
<Docs>
3-
<summary>Provides access to GDI+ basic graphics functionality. More advanced functionality is provided in the <see cref="N:System.Drawing.Drawing2D" />, <see cref="N:System.Drawing.Imaging" />, and <see cref="N:System.Drawing.Text" /> namespaces.</summary>
3+
<summary>Provides access to GDI+ basic graphics functionality. The <see cref="N:System.Drawing.Drawing2D" />, <see cref="N:System.Drawing.Imaging" />, and <see cref="N:System.Drawing.Text" /> namespaces provide more advanced functionality. For limitations, see the <format type="text/markdown"><![CDATA[[Remarks](#remarks) section]]></format>.</summary>
44
<remarks>
55
<format type="text/markdown"><![CDATA[
66
@@ -10,9 +10,6 @@
1010
1111
The <xref:System.Drawing.Graphics> class provides methods for drawing to the display device. Classes such as <xref:System.Drawing.Rectangle> and <xref:System.Drawing.Point> encapsulate GDI+ primitives. The <xref:System.Drawing.Pen> class is used to draw lines and curves, while classes derived from the abstract class <xref:System.Drawing.Brush> are used to fill the interiors of shapes.
1212
13-
> [!CAUTION]
14-
> Classes within the <xref:System.Drawing> namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions. For a supported alternative, see [Windows Imaging Components](/windows/desktop/wic/-wic-about-windows-imaging-codec).
15-
1613
]]></format>
1714
</remarks>
1815
</Docs>

0 commit comments

Comments
 (0)