Application using Gecko Web Browser does not work in Ubuntu 22.04

104 Views Asked by At

I develop a simple C# application using Gecko Web browser component to display a web page into form. In Windows it works perfect, but when I want to run it in Linux running with Mono these errors appear:

enter image description here

I am using Geckofx60(32 bits) version 60.0.55 downloaded from Nuget. The code is very simple

namespace WindowsFormsApp3
{
  static class Program
  {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
      //System.IO.Directory.SetCurrentDirectory(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location));
      System.IO.Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
      Xpcom.Initialize("Firefox");
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      Application.Run(new Form1());
    }
  }
}

Thanks in advance !

0

There are 0 best solutions below