Skip to content

Temporary repo to illustrate an issue with F# projects using SkiaSharp.Views.Mac.

Notifications You must be signed in to change notification settings

danien/SkiaSharpViewsMacFSharpIssue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SkiaSharpViewsMacFSharpIssue

Filed as mono/SkiaSharp#1104 (comment)

[EDIT: This issue is now resolved by removing the reference to mscorlib in the project. See mono/SkiaSharp#1104 (comment)]

Temporary repo to illustrate an issue with F# projects using SkiaSharp.Views.Mac.

When I try to open the SkiaSharp.Views.Mac namespace in an F# project targeting Xamarin.Mac Modern, I get a bunch of errors for a few System.Drawing types:

Error: A reference to the type 'System.Drawing.PointF' in assembly Xamarin.Mac was found, but the type could not be found in the assembly.

including for Point, Size, SizeF, Rectangle, RectangleF.

According to this doc https://docs.microsoft.com/en-us/xamarin/cross-platform/internals/available-assemblies, System.Drawing is not supportedfor Xamarin.Mac Modern.

But it seems that there are extension methods in SkiaSharp.Views.Mac that use System.Drawing classes. https://github.com/mono/SkiaSharp/blob/5e8dc3e2c9e72f2ad0d9feecefbef503ca9fcc15/source/SkiaSharp.Views/SkiaSharp.Views.Shared/Extensions.cs#L45

The preprocessor directives wrapping the System.Drawing extension methods indicate that they will be included for Mac. #if !WINDOWS_UWP && !TIZEN

However, a similar project in C# seems to work fine. Could this be due to something that the F# project system does differently for the assemblies or can/should these System.Drawing extensions not be necessary for Mac (Modern target) since they aren't supported?

About

Temporary repo to illustrate an issue with F# projects using SkiaSharp.Views.Mac.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published