Not able to run application on Ubuntu


I am starting to use AlterNET UI 0.9.3 but I am getting troubles when I compile and run application on Ubuntu.

I think that some dependencies are missing but I cannot find any reference in the documentation about these

dotnet run
Unhandled exception. System.TypeInitializationException: The type initializer for ‘Alternet.UI.Native.Application’ threw an exception.
—> System.TypeInitializationException: The type initializer for ‘NativeApi’ threw an exception.
—> System.DllNotFoundException: Unable to load shared library ‘Alternet.UI.Pal’ or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libAlternet.UI.Pal: cannot open shared object file: No such file or directory
at Alternet.UI.Native.NativeApiProvider.SetExceptionCallback(NativeExceptionCallbackType unhandledExceptionCallback, NativeExceptionCallbackType caughtExceptionCallback)
at Alternet.UI.Native.NativeApiProvider.Initialize()
at Alternet.UI.Native.Application.NativeApi…cctor()
— End of inner exception stack trace —
at Alternet.UI.Native.Application.NativeApi.Application_SetEventCallback_(ApplicationEventCallbackType callback)
at Alternet.UI.Native.Application.SetEventCallback()
at Alternet.UI.Native.Application…cctor()
— End of inner exception stack trace —
at Alternet.UI.Native.Application…ctor()
at Alternet.UI.Application…ctor()
at AlternetUIApp1.Program.Main(String args)

this is the output of the exception when I use LD_DEBUG


Could you please provide more information? What is your Ubuntu version? What is the project that you are running? What is inside the project folder? What are the steps you did in order to install Alternet.UI on Linux?

What I do in order to run Alternet.UI on Linux.

  1. Get the latest version of the UI from the master at
    GitHub - alternetsoft/AlternetUI

  2. Run \AlternetUI\Install.Scripts\

  3. Run and wait till everything compiles and runs.

ControlsSample project is automatically runned.


I am using Ubuntu 22.04 on WSL and I have created a project using the provided template.
Running your instructions, it now works and I am not affected by the issue anymore.

Thanks: I think that these steps should be reported on Documentation page in order to be helpful for other devs.


We will update documentation with this information. Thanks!

Basically, if you are using templates and instructions from
, the only thing needed for the correct work under Linux is to run

and I will add this to the docs.