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 12006 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
On a previously working project, when I attempt to open certain windows or dialog widget designers by double clicking on them in the User Interface area, I get the "Bind Widget Design" dialog. This dialog states:
The widget design Blah.MyWindow is not currently bound to a class.
It then offers me the option to bind to an existing class. Doing so seems to have no effect. It also offers me the option to create a new class. This results in the designer blanking out the name of the widget designer file (what was formerly Blah.MyWindow.cs becomes ".cs"). This is pretty much an unrecoverable state without manually fixing all the project files.
Further, when a widget gets into this state, you cannot properly assign event handlers on the widget. For instance, if I select the user class for the widget, then select Designer on the bottom tab bar, I can see the designer and make changes. But if I select a button on the widget and try to assign an action for the clicked event through the property window on the signal tab, I get the following error:
The class bound to the component "Blah.MyWindow" could not be found. This may be due to syntax errors in the source code file.
I looked through the source files and found no obvious syntax errors. I also compared "good" widget files (where stetic seems to remember the bindings to the user class) and found no obvious differences between the good and bad widgets.
Finally, if I reopen my solution and re-try, I can sometimes get xamarin to open the designer for the widgets properly and assign event handlers.
Whenever the "Bind Widget Design" dialog comes up, the following is logged to the ide log for Xamarin:
(XamarinStudio:5625): libglade-WARNING **: Could not load support for `gnome': dlopen(libgnome.so, 9): image not found
There is no trace of libgnome (.so, .dylib, or otherwise) on my OS X system and it doesn't seem to be included in Mono. This error does not appear when Xamarin successfully loads the designer, only on the files where Xamarin forgets the binding.
I have the same problem. I am able to open a copy of the source files from a different location without problems. Xamarin Studio must have a state file somewhere for each project. (?)
Did you ever find a solution?
I did not find a solution. Instead, I unbound from stetic and took control of my UI files myself. It was a slightly painful process, but to stetic's credit, the files it generates are pretty straightforward and easy to edit. stetic is great when it works, but little issues like this made it more trouble than it's worth. I'm quite happy without it.
On Windows, I was eventually able to eliminate the error by deleting this folder:
And I was able to reproduce the bug using these steps:
1. Create a new widget (e.g. TestWidget) using the Xamarin Studio visual designer.
2. Put a button on the widget, save it, and run the application.
3. Using the Xamarin Studio "Solution" view, create a folder and drag the TestWidget.cs file into that folder.
4. Save all, rebuild, and run the application again. It works fine, and at this point the visual designer is still working just fine.
5. Close Xamarin Studio, then restart it and reopen your project. If you try to open TestWidget in the visual designer, you now get the "Bind Widget Design" bug.
Delete that cache folder, and the problem goes away.
Now, since XAMARIN HAS NEVER FIXED ANY BUG EVER in my history of using their products, I'm not sure why I'm bothering to give these detailed steps. But at least you've got a workaround. :-)
Created attachment 7605 [details]
This seems to work around the issue of the implicit cast operator for FilePath.
The attatchment should resolve the issue. It does not seem to be an issue with the binding or MonoDevelop not finding the file, but an issue with the cast operator for FilePath. I have not looked into the cast issue further, but I hope this will solve some of the headaches for those who have hit this issue.