[MonoDevelop] Issue importing Glade file

kev tripzero at nextabyte.com
Mon Mar 16 09:11:27 EDT 2009

I've created a Glade XML file using Glade3 for my project in
monodevelop.  I was able to import this file, view it in Designer, and
even make changes to it.

Initially, I had a button called "0Button".  This is of course, is an
invalid name in c# (parsing error at compile).  I renamed the button in
designer to "m0Button", saved, recompiled but the parsing error still
existed.  I then deleted the UI from my solution, reopened up the glade
file in glade, edited it there, made some other changes to the UI, and
reimported it to my monodevelop solution.  The UI showed up in Designer
as designed: good.  I then proceeded to compile.  Same error "parsing
error" with "0Button".  I rechecked my glade file, no "0Button" found
anywhere in the xml, only "m0Button".

Getting frustrated, I removed and reimported the glade file several more
times.  Cleaned the solution a bunch.  Restarted the machine.
Physically deleted the generated .cs files from the project using
nautilus.  All to no effect.  The error still persisted and I don't know

I edited the suspect .cs file and changed "0Button" to "m0Button",
recompiled, bingo.  It compiled without error.  When I ran the
application however, the UI looked like the original UI (which had the
"0Button") before I fixed it and made other changes.

It appears as though there is some generating cache somewhere that isn't
getting updated.

The workaround appears to be to rename the main widget's name to
something different in Glade and re-import it.  Monodevelop then
generates clean.


More information about the Monodevelop-list mailing list