Monodevelop doesn't work out from the box... (actually it does)

Started by
6 comments, last by owl 13 years, 4 months ago
I'm on Kubuntu 10.04 and I just installed every posible package named mono. I started a new GTK project (on monodevelop) and when I try to build the solution provided by the wizzard it tells me that the namespace gtk couldn't be found, that I may be missing a "using" statement.

Does anybody knows what am I doing wrong besides using linux and expecting things to work properly by default?

/rant

[Edited by - owl on December 1, 2010 8:32:26 PM]
[size="2"]I like the Walrus best.
Advertisement
gtk-sharp2.
I'm gonna check that. I'm almost sure that I already got it. Thanks.
[size="2"]I like the Walrus best.
Quote:Original post by outRider
gtk-sharp2.
MonoDevelop itself depends on gtk-sharp2, so he must already have that.
Quote:Original post by owl
it tells me that the namespace gtk couldn't be found, that I may be missing a "using" statement.
Not to put too fine a point on it, but you do have a using Gtk; line at the top of your sourcefile, right?

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:Original post by swiftcoder
Quote:Original post by outRider
gtk-sharp2.
MonoDevelop itself depends on gtk-sharp2, so he must already have that.
Quote:Original post by owl
it tells me that the namespace gtk couldn't be found, that I may be missing a "using" statement.
Not to put too fine a point on it, but you do have a using Gtk; line at the top of your sourcefile, right?


I just ran the gtk wizard without adding or removing anything from the source code that gets generated...

I think I found a possible solution.

Quote:All that is needed is to install the gtk-sharp-devel RPM to match your gtk-sharp package and Monodevelop will include all of the GTK# related packages in its package list. If you're lucky then it may even correctly select the gtk-sharp and gdk-sharp packages for you!
[size="2"]I like the Walrus best.
Quote:Original post by owl
I think I found a possible solution.
That is talking about a yum-based package manager. There don't appear to be a separate dev package for gtk-sharp2 in apt.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:Original post by swiftcoder
Quote:Original post by owl
I think I found a possible solution.
That is talking about a yum-based package manager. There don't appear to be a separate dev package for gtk-sharp2 in apt.


Ok. I just installed it at home and I'm getting the same resutlts. The wizard generates this code:

using System;using Gtk;public partial class MainWindow : Gtk.Window{	public MainWindow () : base(Gtk.WindowType.Toplevel)	{		Build ();	}	protected void OnDeleteEvent (object sender, DeleteEventArgs a)	{		Application.Quit ();		a.RetVal = true;	}}


I'm getting 6 warnings:
Warning: The reference 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' is not valid for the target framework of the project. (test)---Warning: The reference 'gdk-sharp, Version=2.12.0.0, (...idem)Warning: The reference 'glib-sharp, Version=2.12.0.0 (...idem)Warning: The reference 'glade-sharp, Version=2.12.0.0 (...idem)Warning: The reference 'pango-sharp, Version=2.12.0.0 (...idem)Warning: The reference 'atk-sharp, Version=2.12.0.0 (...idem)


And an error at line 2 (using Gtk;)
/Projects/test/test/MainWindow.cs(7,7): Error CS0246: The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference? (CS0246) (test)
[size="2"]I like the Walrus best.
Quote:Original post by swiftcoder
Quote:Original post by outRider
gtk-sharp2.
MonoDevelop itself depends on gtk-sharp2, so he must already have that.


I installed gtk-sharp2 and it works now. Apparently I didn't restart monodevelop after installing it and that's why it didn't worked.

Thank you everyone.
[size="2"]I like the Walrus best.

This topic is closed to new replies.

Advertisement