unoplatform / uno.resizetizer

The home for Uno.Resizetizer, an image resizting tooling for Uno Platform apps
https://platform.uno
Other
16 stars 7 forks source link

`TypeInitializationException` on Resizetizer #315

Closed MartinZikmund closed 2 months ago

MartinZikmund commented 2 months ago

Current behavior

After creating a blank Uno app from wizard, I'm getting the following error when trying to launch the WinAppSDK target:

The "GenerateSplashAssets_fe37862be6f8fb908991583ae0de30f0a4023685" task failed unexpectedly.
System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'libSkiaSharp': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
   at SkiaSharp.SKImageInfo..cctor()
   --- End of inner exception stack trace ---
   at Svg.Skia.SKSvgSettings..ctor() in /_/src/Svg.Skia/SKSvgSettings.cs:line 22
   at Svg.Skia.SKSvg..ctor() in /_/src/Svg.Skia/SKSvg.Model.cs:line 55
   at Uno.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger)
   at Uno.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger)
   at Uno.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger)
   at Uno.Resizetizer.GenerateSplashAssets_fe37862be6f8fb908991583ae0de30f0a4023685.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

Expected behavior

No error.

How to reproduce it (as minimally and precisely as possible)

UnoApp13.zip

Environment

Nuget Package:

Package Version(s):

Affected platform(s):

Visual Studio:

Relevant plugins:

Anything else we need to know?

morning4coffe-dev commented 2 months ago

@MartinZikmund This error only appears with Uno.Sdk 5.5.0-dev.13 - resizetizer 1.6.0-dev.26