Issues related to Skia-based projects

System.DllNotFoundException: Gtk: libgtk-3-0.dll

When running the Skia.GTK project head, the following error may happen:

Unhandled exception. System.TypeInitializationException: The type initializer for 'Gtk.Application' threw an exception.
---> System.DllNotFoundException: Gtk: libgtk-3-0.dll, libgtk-3.so.0, libgtk-3.0.dylib, gtk-3.dll

Linux

  • Install the required dependencies:

    sudo apt update
    sudo apt-get install mesa-utils libgl1-mesa-glx ttf-mscorefonts-installer dbus libfontconfig1 libxrandr2
    

You may also need to install the Microsoft fonts manually.

If you are using Windows Subsystem for Linux (WSL), you can find specific instructions in the following video: