[MonoDevelop] Add Project Templates to MD

Lluis Sanchez lluis at ximian.com
Wed Jul 18 13:26:19 EDT 2007


El ds 14 de 07 del 2007 a les 21:28 +0100, en/na Michael Hutchinson va
escriure:
> On 7/14/07, Sergio A. Hernandez <info.geex at gmail.com> wrote:
> > Hello,
> > How can I add my own project templates to MonoDevelop?
> > I create a .xpt.xml file and do the "mdtool setup pack" stuff and
> > looks like works well, but when I do "mdtool setup rep-build" I get
> > this error:
> >     MonoDevelop Add-In Setup Utility
> >     Checking directory: myaddins
> >     Addin configuration file not found in package.
> 
> You need a .addin.xml file. IIRC the templates needs to be a resource
> in an AddIn assembly too. Have you read
> http://www.monodevelop.com/Writing_an_Add-In ?
> 
> It's non-trivial to add new project and file templates to MD, and this
> problem has come up several times now. I think we should add a way to
> load templates from ~/.config/MonoDevelop/Templates (or similar).

I changed the template loader so now it can read templates from files in
addition to resources, which makes writing custom templates much easier
for end users.

That's how it can be done:
      * Create the templates, both project and file templates are
        supported (xpt.xml or xft,xml, although the extension name
        doesn't really matter).
      * Create a .addin.xml file which registers the templates.
      * Copy all templates and the .addin.xml file to
        ~/.config/MonoDevelop/addins (you can create a subdirectory
        there).

I'm attaching a sample template and .addin.xml file.

Lluis.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelloTemplate.xpt.xml
Type: application/xml
Size: 1022 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20070718/6778f2df/attachment.rdf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MyTemplates.addin.xml
Type: application/xml
Size: 573 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20070718/6778f2df/attachment-0001.rdf 


More information about the Monodevelop-list mailing list