SkiaSharp icon indicating copy to clipboard operation
SkiaSharp copied to clipboard

WinUI view not working on WindowsAppSdk 1.6

Open beto-rodriguez opened this issue 1 year ago • 12 comments

Description

I am not able to run an app containing an SKXamlCanvas on WindowsAppSdk 1.6, not completely sure if the issue belongs to this library or to WindowsAppSdk.

Code

Based on my research on:

https://github.com/beto-rodriguez/LiveCharts2/issues/1580

I can confirm that LiveCharts does not work on WindowsAppSdk 1.6, then I realized that even just the SKXamlCanvas does work on that version.

Expected Behavior

No response

Actual Behavior

No response

Version of SkiaSharp

2.88.3 (Current)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

WindowsAppSdk 1.6

Devices

No response

Relevant Screenshots

No response

Relevant Log Output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

beto-rodriguez avatar Sep 18 '24 22:09 beto-rodriguez

It is this issue,

https://github.com/mono/SkiaSharp/issues/2999

the Bug is fixed but a new Skiasharp 3 nugget release is needed.

inforithmics avatar Sep 19 '24 04:09 inforithmics

Can you try the latest nightly on https://aka.ms/skiasharp-eap/index.json and let me know if it starts working again? I want to do a release, but I want to make sure I fixed it.

mattleibow avatar Sep 30 '24 03:09 mattleibow

@mattleibow Using the latest Microsoft.WindowsAppSDK, v1.6.240923002:

SkiaSharp.Views.WinUI 3.0.0-nightly.263 - Not working SkiaSharp.Views.WinUI 3.0.0-nightly.265 and newer - Works SkiaSharp.Views.WinUI 3.0.0-preview.5.1 and newer - Works

I guess that it's not yet backported into SkiaSharp 2, since the latest nightly version (2.88.9-nightly.176) does not work.

Mangepange avatar Oct 02 '24 06:10 Mangepange

@mattleibow I read in another issue that this fix might not be ported to 2.x, is that true?

beto-rodriguez avatar Oct 02 '24 07:10 beto-rodriguez

@beto-rodriguez Ouch, where did you see that information?

Mangepange avatar Oct 03 '24 07:10 Mangepange

Since that is still preview and SkiaSharp is stable, I cannot really depend on it for SkiaSharp 2.x. However, the 2.x branch does not have the convenient native library that I can use. I technically can add it to 2.x but that is a lot of work, and that old branch is very iffy to build. microsoft/CsWinRT#1645 (comment)

Bush-cat avatar Oct 03 '24 11:10 Bush-cat

Does anybody know if there are any plans for when a stable version of SkiaSharp 3 is released?

Mangepange avatar Oct 10 '24 08:10 Mangepange

When SkiaSharp 3 is released?

ArpitViradiyaCrowncon avatar Oct 10 '24 09:10 ArpitViradiyaCrowncon

When SkiaSharp 3 is released?

Yes, just wondering since it doesn't seems to be sure that the fix for this issue will be backported into v2.

Mangepange avatar Oct 10 '24 10:10 Mangepange

Yes, just wondering since it doesn't seems to be sure that the fix for this issue will be backported into v2.

So how can we resolved this issue?

ArpitViradiyaCrowncon avatar Oct 10 '24 10:10 ArpitViradiyaCrowncon

Yes, just wondering since it doesn't seems to be sure that the fix for this issue will be backported into v2.

So how can we resolved this issue?

See #2999. It's fixed in SkiaSharp 3.

Mangepange avatar Oct 10 '24 10:10 Mangepange

Yes, just wondering since it doesn't seems to be sure that the fix for this issue will be backported into v2.

So how can we resolved this issue?

See #2999. It's fixed in SkiaSharp 3.

I think that' for WinUi, I want for .Net maui. In nuget I can only show <PackageReference Include="LiveChartsCore.SkiaSharpView.Maui" Version="2.0.0-rc3.3" />

ArpitViradiyaCrowncon avatar Oct 10 '24 10:10 ArpitViradiyaCrowncon

Closing this for now as the issue is fixed for both v2 and v3 in the latest preview.

mattleibow avatar Oct 25 '24 16:10 mattleibow