mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
424 stars 140 forks source link

GtkSharp and ProjectReunion: 'GLib.Object' threw an exception when PrintOperation is using #296

Closed LeftTwixWand closed 3 years ago

LeftTwixWand commented 3 years ago

Describe the bug: I've created a new ProjectReunion solution and trying to use PrintOperation class from the GtkSharp nuget package. But get the error:

System.TypeInitializationException: 'The type initializer for 'GLib.Object' threw an exception.'
Inner Exception:
DllNotFoundException: GObject: libgobject-2.0-0.dll, libgobject-2.0.so.0, libgobject-2.0.0.dylib, gobject-2.dll

Stack Trace image

Steps to reproduce:

  1. Create an empty ProjectReunion app, using solution template from marketplace
  2. Add GtkShart nuget package
  3. Try to create a PrintOperation object

Strange, but at the same time default .NET 5 console application with GtkSharp package working fine. I's it a problem of ProjectReunion? Or GtkSharp is not optimized for the new platform?

NuGet package version: Project Reunion 0.5.6 GtkSharp 3.24.24.34

Environment: Visual Studio 2019 version 16.10.0 Preview 2.1 Windows 10 version 20H2 build 19042

Therzok commented 3 years ago

The package is published by github.com/gtksharp/gtksharp.

LeftTwixWand commented 3 years ago

The package is published by github.com/gtksharp/gtksharp.

Ok, I will transfer this issue to those repository. Thanks!