Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 38967 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 15112 [details]
Screenshot of that error when i try to add my widget to gui builder.
Description of Problem:
I created GTK C# project in Monodevelop(Xamarin studio 5.10). And then like on tutorial on web i created a created new library project inside. Created widget. Built project, by using plus "+" button in gui toolbox i added that library that i created. My widget appeared in toolbox. But when i want to drag that widget on gui i get following error:
'The widget 'LibraryName.WidgetName' could not be found.'
I tried multiple times to create new libraries but every time i get that error. Pls fix that problem. Bellow(also in attachment too) is screenshot of that error when i try to add my widget to gui builder:
This seems to be working for me, can you try updating to latest version?
I was able to easily reproduce it by:
- Create new gtk#-2.0 project: libTestWidget
- Set Project to type "Library"
- Remove "Program.cs"
- Delete MainWindow
- Add new Widget "TestWidget"
- Create new gtk#-2.0 project
- Add >assembly reference< to libTestWidget
- Try to add it to ui in designer
When libTestWidget is in the same solution and linked by Project Reference instead of assembly reference, it works as expected.
I think you have different problem, that custom widget doesn't appear at all in toolbox, right?
In that case I open pull request: https://github.com/mono/monodevelop/pull/1953
Still need info(if it's reproducible with latest version) for original bug where exception was thrown when trying to add custom widget.
I found work around. In MainWindow.cs anywhere in code create library object(no need reference, just create new object) and rebuild project and widgets will be able to be added to GUI.
For example in firstname.lastname@example.org project:
public partial class MainWindow : Gtk.Window
public MainWindow () : base (Gtk.WindowType.Toplevel)
new libTestWidget.TestWidget (); // added this line
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
a.RetVal = true;
it did not show up, but I thought that was more or less intended.
Therefore, I manually added the assembly with the ToolBox's plus button.
The widget did then show up in the ToolBox, but dragging it into the designer got me the error described in this bug.
I just cloned the monodevelop repository and built monodevelop-220.127.116.119 from source. (could not get master to compile)
For me, the bug (described in this report) also exists in that version.