Aspose.Slides.NET6.CrossPlatform: Wrong Native Library Imports

I am trying to use cross platform version of the aspose library:

PackageReference Aspose.Slides.NET6.CrossPlatform 23.11.0

To create self-contained linux package

dotnet publish -r lin> ux-x64 -o …//linux-x64 -c Release --self-contained true -p:PublishSingleFile=true

Build process is outputing native linux library:

libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so

But Running the self-contained library is failing with the next error:

System.DllNotFoundException: Unable to load shared library ‘libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23’ or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23: cannot open shared object file: No such file or directory
at System.Runtime.InteropServices.NativeLibrary.LoadByName(String libraryName, QCallAssembly callingAssembly, Boolean hasDllImportSearchPathFlag, UInt32 dllImportSearchPathFlag, Boolean throwOnError)
at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullable1 searchPath, Boolean throwOnError) at System.Runtime.InteropServices.NativeLibrary.Load(String libraryName, Assembly assembly, Nullable1 searchPath)
at .(String , Assembly, Nullable`1 )
at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
at .d(Int32 d, Int32 v, Int32 c, IntPtr& t)
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height)
at …cctor()
— End of inner exception stack trace —
at …ctor(Presentation )
at tor(TextFrame )
at Aspose.Slides.TextFrame…ctor( )
at Aspose.Slides.AutoShape()
at .(IAutoShape , , )
atGroupShape, )
at GroupShape , )
at .(IBaseSlide , )
at .(IMasterSlide )
at .(IPresentation )
at .( , IPresentation)
at .(Presentation , Stream, InterruptionToken )
— End of inner exception stack trace —
at .(Presentation , Stream, InterruptionToken )
at Aspose.Slides.Presentation(Stream , Boolean)
at Aspose.Slides.Presentation.(Stream , Boolean)
at Aspose.Slides.Presentation.(String , Boolean)

NOTE: library is search the liblibaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so
liblibaspose instead of libaspose

Adding path the library path export LD_LIBRARY_PATH=/home/site/wwwroot/tools/linux-x64 is not solving the problem.

Linux version:

PRETTY_NAME=“Debian GNU/Linux 11 (bullseye)”
NAME=“Debian GNU/Linux”
VERSION_ID=“11”
VERSION=“11 (bullseye)”
VERSION_CODENAME=bullseye
ID=debian

Code

using (var presentation = new Aspose.Slides.Presentation(sourcePresentation))
{
    // save the presentation to PDF
    presentation.Save(outputFile, Aspose.Slides.Export.SaveFormat.Pdf);
}

@IevgenN,

We need to evaluate your issue in details. 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): SLIDESNET-44384

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.

@IevgenN

Could you please try our latest version/fix: Aspose.Slides for .NET (e.g., v24.2 or v24.3):

Your issue should be fixed in it. Let us know if you still find the issue.