I have a .NET Core 5 app running in a Pivotal Cloud Foundry container on a Linux (Ubuntu Bionic 18.04 LTS) buildpack, using
- Aspose.Words 21.8.0,
- Aspose.PDF 21.8.0
- SkiaSharp.NativeAssets.Linux.NoDependencies 2.88.0-preview.127
and I am seeing the error below from Aspose.Words. I’ve tried different combinations of SkiaSharp.NativeAssets.Linux.NoDependencies, SkiaSharp.NativeAssets.Linux, etc versions, but haven’t been able to find a combination that works. (The SkiaSharp package currently referenced looks to be a match with the 88.0 version from the error message.)
Is there a different nuget package we should be using to avoid this issue?
System.TypeInitializationException: The type initializer for ' ' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception. ---> System.InvalidOperationException: The version of the native libSkiaSharp library is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [88.0, 89.0). at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Version minSupported, Version current, Boolean throwIfIncompatible) at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible) at SkiaSharp.SKObject..cctor() --- End of inner exception stack trace --- at SkiaSharp.SKObject..ctor(IntPtr handle, Boolean owns) at SkiaSharp.SKBitmap..ctor(IntPtr handle, Boolean owns) at SkiaSharp.SKBitmap..ctor() at SkiaSharp.SKBitmap..ctor(SKImageInfo info, Int32 rowBytes) at SkiaSharp.SKBitmap..ctor(SKImageInfo info) at SkiaSharp.SKBitmap..ctor(Int32 width, Int32 height, SKColorType colorType, SKAlphaType alphaType) at SkiaSharp.SKBitmap..ctor(Int32 width, Int32 height, Boolean isOpaque) at ..cctor() ... at Aspose.Words.Document.UpdatePageLayout() ... at Aspose.Words.Range.UpdateFields() at Aspose.Words.Document.UpdateFields()