Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
For the .NET6 (or later) platforms, compare to previous platforms (.netcore31 or before), an important difference is about the graphics library. In this official Microsoft Document, it explains for .NET6 or later releases the graphics library “System.Drawing.Common” will be only supported on Windows, and gives recommendations to replace the graphics library.
Note: For Apose.Cells product, we have conducted the evaluation and have completed the migration of the graphics library. We use SkiaSharp instead of System.Drawing.Common in non-Windows systems, as suggested in Microsoft’s official documentation. Please note that this critical change will take effect in Aspose.Cells 22.10.1 or later for .Net6.
For .netcore31 or before, for compatibility and stability, currently we still use the “System.Drawing.Common” graphics library. The dependencies for .netcore31 or before are as follows:
First you can create a .net6 (or greater) application with VS2022, then you can choose the following installation options:
Search for Aspose.Cells from NuGet: Aspose.Cells for .NET NuGet Package. You can also install Aspose.Cells from the Nuget package manager in VS2022.
“SkiaSharp” or “System.Drawing.Common” will be installed automatically as a dependency of Aspose.Cells 22.10.1 or later for .Net6 (or greater) platforms, which depends on “Target OS” configuration in your project.

Open the installation directory or the DLL directory, then select step 3 or 4 below:
locate the “net6.0-windows” subdirectory, add the Aspose.Cells.dll in it to your .net6 application. Manually add the following nuget packages to your .net6 project:
In this way, you will use “System.Drawing.Common” as a dependency on your windows system for .Net6 (or greater) project. In this configuration, the result of the drawing is closer to .netcore31 or before.
In this way, you will use “SkiaSharp” as a dependency on your windows system for .Net6 (or greater) project. Please note the version that uses “SkiaSharp” as a dependency doesn’t support printing to printer feature.
Refer to the installation method on Windows, you can only select SkiaSharp as a graphics library dependency on Linux system.
You need to do the following additional operations to ensure proper use of SkiaSharp under Linux:
apt-get update && apt-get install -y libfontconfig1
OR
apk update && apk add fontconfig
Please note, the version of the added package “SkiaSharp.NativeAssets.Linux” or “SkiaSharp.NativeAssets.Linux.NoDependencies” should be corresponding to the version of “SkiaSharp” referenced by Aspose.Cells for .NET. The versions of Aspose.Cells for .NET and the corresponding referenced “SKiaSharp” versions are described as following:
| Aspose.Cells for .NET | SkiaSharp |
|---|---|
| >= 22.10.1 && <= 22.11 | 2.88.0 |
| >= 22.12 && <= 23.9 | 2.88.3 |
| >= 23.10 && <= 24.12 | 2.88.6 |
| = 25.1.1 | 3.116.1 |
| >=25.1.2 | 2.88.9(net6.0, net8.0), 3.116.1(net9.0) |
Add the nuget package “SkiaSharp.NativeAssets.Linux 3.116.1” to your .net6 (or greater) project.
Use the following Dockerfile:
# Ubuntu 20.04
FROM mcr.microsoft.com/dotnet/runtime:6.0-focal AS base
WORKDIR /app
# add "libfontconfig1" package if using "SkiaSharp.NativeAssets.Linux" in your project
# Or you need to use "SkiaSharp.NativeAssets.Linux.NoDependencies" in your project
RUN apt-get update && apt-get install -y libfontconfig1
# Copy fonts from local to docker
# For example, put a "fonts" folder in your project folder, and put the font files in it,
# then, use the following line:
COPY fonts/ /usr/share/fonts
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal AS build
WORKDIR /src
COPY ["Ubuntu_Docker.csproj", "."]
RUN dotnet restore "./Ubuntu_Docker.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "Ubuntu_Docker.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Ubuntu_Docker.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Ubuntu_Docker.dll"]Add the nuget package “SkiaSharp.NativeAssets.Linux 3.116.1” to your .net6 (or greater) project.
Use the following Dockerfile:
#Alpine 3.16
FROM mcr.microsoft.com/dotnet/runtime:6.0-alpine3.16 AS base
WORKDIR /app
# add "fontconfig" package if using "SkiaSharp.NativeAssets.Linux" in your project
# Or you need to use "SkiaSharp.NativeAssets.Linux.NoDependencies" in your project
RUN apk update && apk add fontconfig
# Copy fonts from local to docker
# For example, put a "fonts" folder in your project folder, and put the font files in it,
# then, use the following line:
COPY fonts/ /usr/share/fonts
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine3.16 AS build
WORKDIR /src
COPY ["Alpine_Docker.csproj", "."]
RUN dotnet restore "./Alpine_Docker.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "Alpine_Docker.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Alpine_Docker.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Alpine_Docker.dll"]Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.