[MonoTouch] XIB files not autogenerating designer.xib.cs files.
jepsen at gmail.com
Fri Aug 21 19:16:09 EDT 2009
Thanks Michael I'll give that a try.
On Fri, Aug 21, 2009 at 4:07 PM, Michael Hutchinson <
m.j.hutchinson at gmail.com> wrote:
> On Fri, Aug 21, 2009 at 6:47 PM, Phil Jepsen<jepsen at gmail.com> wrote:
> > I've tried importing
> > into a new monotouch project.
> > But I when open either of the XIB files Monodevelop does not auto create
> > either *.designer.xib.cs files.
> > Is this a bug or stupidity on my behalf?
> > Can anyone please give me a basic rundown on how to import any of the
> > samples into a new monotouch project, this would be much appreciated.
> MonoDevelop doesn't create *.xib.designer.cs files when you add a xib file.
> The thing MD does are:
> * If you have a .xib.designer.cs file for the .xib file, MD generates
> codebehind for the xib file in the designer file. This is so that you
> can disable the code generation on a per-file basis by removing or
> renaming the .xib.designer.cs file.
> * The xib file templates in MD include .xib.designer.cs files, so that
> when you create xib files using MD you will have code generation.
> * When you add an existing file that ends with .xib, .xib.cs, or
> .xib.designer.cs, MD looks for the other files in the "group" and
> automatically adds them. This is a convenience for adding files that
> have been removed or copied from other projects.
> Hence you can solve your problem by simply creating a blank
> .xib.designer.cs file and adding it. There is a slight problem in that
> you cannot create this file from within MD, since the file name for
> any C# file in MD must be a valid C# identifier name. This is a known
> You can create empty .xib.designer.cs files for all of your xibs in
> the current director and subdirectories with the following bash
> command: for F in `find . -name *.xib`; do touch "$F.designer.cs";
> A possible solution to your problem would be for me to add a "create
> designer file" context menu command for xib files.
> Michael Hutchinson
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MonoTouch