Gtk # in monodevelop no longer works after upgrading to ubuntu 11.10 units

I had some monodevelop programs with the GTK # user interface, which ran smoothly on ubuntu 11.04 with unity. I upgraded unbantu 11.10 with unity. Now I get the following error: "The type or namespace name" Gtk "could not be found. Are you missing an assembly reference?". Indeed, in my recommendations, the links atk-sharp, gdk-sharp, glade-sharp, glid-sharp, stk-sharp and pango-sharp are red and I cannot add them again.

If I search softwere for installation in gtk-sharp, then it tells me that Gtk # 2.10 is installed. If I run a new gtk project in monodevelop, it gives the same errors.

Does anyone know how to fix this? Thanks!

+4
source share
2 answers

This issue is related to the Mono execution version. Please change the Mono project execution version from Mono / .NET 3.5 to Mono / .NET 4.0 to fix this problem.

To do this, follow these steps:

  • Launch the Project Settings dialog box using Solution Explorer.
  • Select the "General" project options available in the "Create" group.
  • Change Runtime version to Mono / .NET 4.0.
  • MonoDevelop will update the current project as Visual Studio 2010 equivalents. Then rebuild the project and check the result.
+4
source

In my case, the solution installed the GTK # libraries. For Debian based distributions, GTK # can be installed as

sudo apt-get install gtk-sharp2 

Or if you are using a RedHat based distribution,

 yum install gtk-sharp2-devel 

See Tommy's comment above.

+2
source

Source: https://habr.com/ru/post/1393103/


All Articles