Skip to content

Conversation

benaadams
Copy link
Member

@benaadams benaadams commented Jul 30, 2020

Summary

Recommend not to use System.Drawing, but other libraries instead like the .NET Foundation project SixLabors.ImageSharp instead as it is cross-platform (unlike Windows Imaging Components) and safe to use in a ASP.NET and Windows Service.

The article currently carries this caution, which does not help cross platform:

Classes within the 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.

This is similar to the SmtpClient doc which recommends the .NET Foundation project MailKit

We don't recommend that you use the SmtpClient class for new development because SmtpClient doesn't support many modern protocols. Use MailKit or other libraries instead. For more information, see SmtpClient shouldn't be used on GitHub.

/cc @richlander @sbwalker @clairernovotny @BillWagner

@dotnet-bot dotnet-bot added this to the July 2020 milestone Jul 30, 2020
Co-authored-by: Rich Lander <rlander@microsoft.com>
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM @benaadams

Thanks for making the changes @richlander recommended.

I'll :shipit: now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants