Resolving libcef.dll Errors in IronPDF

This article was translated from English: Does it need improvement?
Translated
View the article in English

Are you seeing the following error messages?

  • Error loading one of the Chrome assemblies (libcef.dll)
  • Chrome Deployment Failure (error while loading libcef.dll) (203)

This is because System.Drawing is not included in Windows Nano Server, and Windows Server Core (.NET6).

The official .NET images for Windows are based on Nano Server.

To work around this issue, we suggest either:

  1. Build & deploy your project as self-contained. Click here for more information on this option.
  2. Switch to Linux-based container images by changing the following property in your .csproj file:
<!-- Change the default OS for Docker to Linux to use Linux-based images -->
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<!-- Change the default OS for Docker to Linux to use Linux-based images -->
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
XML

You can then add Linux dependencies with the following shell commands:

# Update package lists and install necessary libraries for IronPDF on Linux
RUN apt update \
    && apt install -y libgdiplus libxkbcommon-x11-0 libc6 libc6-dev libgtk2.0-0 libnss3 \
    libatk-bridge2.0-0 libx11-xcb1 libxcb-dri3-0 libdrm-common libgbm1 libasound2 \
    libxrender1 libfontconfig1 libxshmfence1
# Update package lists and install necessary libraries for IronPDF on Linux
RUN apt update \
    && apt install -y libgdiplus libxkbcommon-x11-0 libc6 libc6-dev libgtk2.0-0 libnss3 \
    libatk-bridge2.0-0 libx11-xcb1 libxcb-dri3-0 libdrm-common libgbm1 libasound2 \
    libxrender1 libfontconfig1 libxshmfence1
SHELL

(The above dependencies are for Debian 11, though specific dependencies for Ubuntu, CentOS, Amazon Linux, and more can be viewed here)

Curtis Chau
Escritor Técnico

Curtis Chau tiene una licenciatura en Ciencias de la Computación (Carleton University) y se especializa en el desarrollo front-end con experiencia en Node.js, TypeScript, JavaScript y React. Apasionado por crear interfaces de usuario intuitivas y estéticamente agradables, disfruta trabajando con frameworks modernos y creando manuales bien ...

Leer más
¿Listo para empezar?
Nuget Descargas 16,154,058 | Versión: 2025.11 recién lanzado