Xamarin Monodevelop - Error CS0103

I just installed Xamarin Monodevelop on Mac OSX, I created a GTK # project where I have a very main window that I havenโ€™t even touched. This is the error she gives me on Build();

Error CS0103: The name 'Build' does not exist in the current context

 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; } } 
+5
source share
1 answer

The Build method is created by the Stetic user interface creator, akin to the InitializeComponents the Visual Studio user interface constructor.

It seems to be a bug in Xamarin Studio (I use 5.5.4.15), where the Build method is not generated unless you add the widget to the window. Try adding a VBox or another container, and then rebuild.

+6
source

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


All Articles