"SkiaSharp" warnings with Aspose.Words 24.4.0

Hello Support. I just updated my Aspose.Words nuget package to 24.4.0 but I had to rollback to 24.3.0 because I cannot get rid of warnings during build:

Severity Code Description Project File Line Suppression State Details
Warning The referenced component ‘C:\Users\rozeb.nuget\packages\skiasharp.nativeassets.macos\2.88.7\buildTransitive\net462....\runtimes\osx\native\libSkiaSharp.dylib’ could not be found. kh_report_wpf

Building .NET Framework Solution targeting .NET Framework 4.8

@kidkeogh Yes, starting from 24.4 version of Aspose.Words .NET 4.6.2 version of Aspose.Words has a dependency on SkiaSharp. This was done in order to support WebP image format.
https://www.nuget.org/packages/Aspose.Words#dependencies-body-tab

Do you add reference to SkiaSharp separately in your project? I have tested on my side and cannot reproduce the problem. If possible, could you please create a simple application that will allow us to reproduce it? We will check the issue and provide you more information.

This is the message. Zip file to follow.

Foo.zip (11.3 KB)

Please note: When you first open the solution it will build without any errors. Once you’ve done that, save and close the solution, then open it again and rebuild. At that point the warning will appear in your Error List.

As an aside. Aspose.Words has dependencies on SkiaSharp 2.88.6

After adding the nuget package for Aspose.Words I see the solution also includes packages for System.Buffers, System.Memory, System.Numeric.Vectors, and System.Runtime.CompilerServices.Unsafe

It then proposes updates to several of these, including updates to SkiaSharp packages to 2.88.7

We always keep our packages as up to date as possible. We need to be able to do this. We cannot have a solution with over 80 projects in it with some of them insisting on using older packages. I don’t, however, think that it would make any difference if we were to go back to 2.88.6 for the SkiaSharp packages.

Yes, going back to 2.88.6 doesn’t help. It just changes the warning accordingly:

@kidkeogh Thank you for additional information. But it looks like not Aspose.Words issue. The problem occurs even washout Aspose.Words and only with SkiaSharp. So I would suggest you to report the issue to SkiaSharp team.
I have investigates your vbproj file and it looks like the problem is caused by the following line:

<Import Project="..\packages\SkiaSharp.NativeAssets.macOS.2.88.7\build\net462\SkiaSharp.NativeAssets.macOS.targets" Condition="Exists('..\packages\SkiaSharp.NativeAssets.macOS.2.88.7\build\net462\SkiaSharp.NativeAssets.macOS.targets')" />

If remove it from vbproj file, no warning is shown.

Hello Alexey, yes, that is correct, but the problem is that Visual Studio keeps putting that line back in so every time the solution is opened the same thing happens.

Could you direct me to the SkiaSharp team?

@kidkeogh You can contact SkiaSharp team here:
https://github.com/mono/SkiaSharp/issues

1 Like

Hello @alexey.noskov

I reported the issue to the SkiaSharp team but they are not nearly as responsive as you guys are here at Aspose. In fact it looks like my query there has been completely ignored.

Is there anything you guys can do your end? Use alternative 3rd party software perhaps if SkiaSharp cannot be relied upon to be responsive to its user base?

In the meantime could you tell me what I need to distribute in order to ensure that my .NET Framework 4.8 solution will continue to work as expected with Aspose.Words 24.4 or later on Windows? If you can reassure us that it will be ok even if I don’t include the “MacOs” DLLs from SkiaSharp then we can move forward and keep Aspose.Words up to date.

Yes, starting from 24.4 version of Aspose.Words .NET 4.6.2 version of Aspose.Words has a dependency on SkiaSharp. This was done in order to support WebP image format.

@alexey.noskov I would recommend that you refactor Aspose.Words to move the WebP image format functionality into a separate NuGet package so that the SkiaSharp dependency can be moved to the new NuGet package. Something like Aspose.Words.WebP or Aspose.Words.Images.WebP .

This would allow for the developers to decide if they want to include support for the WebP image format in their application and thus take on the dependency for using SkiaSharp.

Not entirely sure why that would require a new dependency, by the way. We use Aspose.Imaging already to handle WebP files in other scenarios, and Aspose.Imaging does not require a dependency on SkiaSharp?

@kidkeogh Unfortunately, we cannot use an alternative of SkiaSharp. Actually we use SkiaSharp for a quite long time already in .NET Standard and .NET Core versions of Aspose.Words ant it works perfectly fine.
Currently I can only suggest either use the workaround proposed above or simply ignore the warning. We will further investigate the problem.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-26878

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

Brilliant… Thanks Alexey… can you just add a comment here to suggest what new .dlls I definitely need to distribute after moving to Aspose.Words 24.4 ?

@kidkeogh It is not quite clear what you mean. You should distribute Aspose.Words.dll, SkiaSharp.dll and it’s dependencies. When you publish the application all required dlls will be in the output.

Yes we are distributing all its dependencies, as per New NuGet References with Aspose Words 24.4.0 - #3 by kidkeogh we are distributing System.Buffers etc.

The problem is as mentioned here that every time I open our solution it complains that it cannot find libSkiaSharp.dylib

What I don’t understand is why there are .macOS. assets being distributed with an application that will only ever be used on Windows. In fact it’s only ever going to be used on 64-bit windows. I suspect that someone in the SkiaSharp team didn’t get it right when targeting .NET Framework 4.8 … ?

@kidkeogh You can configure MSBuild and specify runtime identifier to build the application for a concrete platform. Actually .NET Framework 4.8 application is not mandatory targeting only windows.

Hello Alexey,

I’m wondering whether your team might reconsider using SkiaSharp for dealing with WebP images. For two reasons:

  1. As I pointed out before, your product Aspose.Imaging seems to be able to deal with WebP just fine, without dependency on SkiaSharp

and, most importantly

  1. The SkiaSharp team appears to be completely unresponsive. In fact, I have found since that the issue has been around since 2022 with zero response from the SkiaSharp team.

See my own issue: https://github.com/mono/SkiaSharp/issues/2824
And the older issue: https://github.com/mono/SkiaSharp/issues/2223

Do you really want to make your software dependent on a 3rd party provider who can’t be bothered to address issues like these?

In fact the issue was reported yet another time, and simply closed even though it was never resolved, purely on the say so of one commenter:

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

@kidkeogh Currently there are no plans to switch to Aspose.Imaging. SkiaSharp is Microsoft recommended alternative of System.Drawing for multiplatform use.
Actually SkiaSharp is a simple wrapper around Google’s skia image processing library, which is widely used and well recommended itself. We use SkiaSharp in our .NET Standard and .NET Core version to deal with graphics for a quite a long time and there were no critical issues with it.

I have logged a request WORDSNET-26895 to reconsider using SkiaSharp in .NET Framework version or make the dependency optional.

1 Like