I have the same PRoblem on this line
presentation.Save(outputPath, Aspose.Slides.Export.SaveFormat.Pdf);
If I convert it with dotnet.exe publish -r linux-x64 -o ../linux-x64 -c Release --self-contained true -p:PublishSingleFile=true
I can run it on my windows and in wsl2 but not on linux
I have tried different systems and docker images.
The lateast try was on
FROM mcr.microsoft.com/dotnet/sdk:6.0
apt install nuget msbuild mono-xbuild ttf-mscorefonts-installer
I get always this message
terminate called after throwing an instance of ‘std::logic_error’
what(): basic_string::_M_construct null not valid
Aborted (core dumped)
@Tivian_XI,
Thank you for contacting support.
The issue has been planned to be fixed in Aspose.Slides for .NET 24.2. This release will be published in the second half of February.
With Aspose.Slides for .NET 23.10 (from the ZIP package), you can use the following Dockerfiles.
For Debian:
FROM mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim AS build
WORKDIR /source
COPY *.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish --no-restore -o /app
FROM mcr.microsoft.com/dotnet/runtime:6.0-bookworm-slim
RUN apt-get update && apt-get install -y \
libfontconfig1 \
libfreetype6
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["./CrossPlatformApp"]
For Ubuntu:
FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy AS build
WORKDIR /source
COPY *.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish --no-restore -o /app
FROM mcr.microsoft.com/dotnet/runtime:6.0-jammy
RUN apt-get update && apt-get install -y \
libfontconfig1 \
libfreetype6
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["./CrossPlatformApp"]