the Fiddler's picture

[OpenTK] Create project templates for Visual Studio and MonoDevelop (help wanted)

Project:The Open Toolkit library

Both Visual Studio and MonoDevelop support the addition of custom project templates. It would be beneficial to provide such templates that automate the setup of new OpenTK projects.

In their simplest form, the templates should perform the following actions:

  1. Add OpenTK.dll and System.Drawing to the project references.
  2. Add OpenTK.dll.config to the project items and set it to be copied to the output directory.
  3. Create a simple Program.cs file that constructs and runs a GameWindow.

In addition to the above, we could also add templates for GUI applications (WinForms GLControl or GTK# GLWidget), as well as code templates for VB.Net and other .Net languages.

Is there anyone familiar with VS or MD extensibility that could provide some pointers on how to implement this?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
flopoloco's picture


With a simple file search in
C:\Program Files\MonoDevelop\AddIns\BackendBindings\MonoDevelop.CBinding.dll
I found that code templates are bundled in .dll files which makes things difficult.

On the other hand, things are better for SharpDevelop 3.1.0
You simply create an xpt text file (OpenTKApplication.xpt) in:
C:\Program Files\SharpDevelop\3.0\data\templates\project\CSharp

I have made such a template as an attached file and tested it successfully. :) Only you have to remove the OpenTK assembly (because it's not in GAC) and include it as a file from your disk.

P.S. Actually, I remember some one made a VS project template for OpenTK and posted a message in forums.

OpenTKApplication.txt4.42 KB
charles's picture


Hi flopoloco,
I'm currently working on getting an installer setup and the good news is that it supports GAC which should make creating the templates a little easier. Anyway I'll have a look at integrating the template you've provided when I can.

bader51's picture


i know this is a lil old lol but i converted the quick start project to and exported as a template a while ago 2 make it easier 2 start up projects.
Heres a link to the template if any1 wants it :)
just copy it into C:\Users\**USER**\Documents\Visual Studio **VERSION**\Templates\ProjectTemplates

Tal's picture


You can use in File -> Export Template in both VS 2005 and VS 2008.