Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build warnings for platform specific items #5167

Open
kenkendk opened this issue Apr 30, 2024 · 1 comment
Open

Fix build warnings for platform specific items #5167

kenkendk opened this issue Apr 30, 2024 · 1 comment

Comments

@kenkendk
Copy link
Member

The codebase is using a custom platform detection in Duplicati.Library.Utility which can be updated to use the standard .NET OperatingSystem class.

Methods and classes that are OS specific should be marked with [SupportedOSPlatform("windows")] attributes, and any warnings related to calling operating system specific code should be fixed.

@Jojo-1000
Copy link
Contributor

There are 167 warnings about incorrect calls. Most of them can be resolved by using the attribute and correct platform check except for Captcha/CaptchaUtil: This will need to be reworked, because it uses System.Drawing, which needs GDI+ and is only supported on Windows.

If you can't use System.Drawing with your application, recommended alternatives include ImageSharp, SkiaSharp, Windows Imaging Components, and Microsoft.Maui.Graphics.

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

No branches or pull requests

2 participants