Can't add a Gadgeteer Project to a solution with Gadgeteer Module Project for testing


I have been writing a few Gadgeteer Modules but keep making stupid mistakes and the debugging approach of:

is reaaally time consuming.

I know I should be able to have a test project inside the solution but this doesn’t work for me. If I Create New Project…Gadgeteer Project, in the visual designer, my toolbox contains nothing. I’ve manually added references to the Hydra (for example) and then hand-coded the initialization for the Hydra etc. in the “generated.cs” file but this gets overwritten when I hit run because the blank diagram generates a blank “generated.cs”.

Does anyone else know what’s wrong? Because it’s taking about 3-4 minutes everytime I want to test a new version with all the uninstalling, closing visual studio, installing, re-opening etc.

Thanks for the help,


I usually install the module once. And then I just copy my debug dll to the location where the module is installed. Try that.

Ah okay, so you have visual studio open twice with 2 different solutions? One with the module project and the other with a normal project and then just make sure you copy the dll over every time you build the module?

Yes something like that.You can add post build step in visual studio that will automatically copy the dll.

You shouldn’t write any code on the generated.cs file because, as you’ve noticed, Visual Studio overwrites it.

When you are developing a new module, you should:

  • add a new project to the solution, so you will have a MyModule and a MyModuleTest project
  • add a reference in the MyModuleTest to MyModule
  • match the namespace of the two projects (don’t forget to do it in the properties file too)
  • right-click on MyModuleTest and set it as the Startup Project

In the Program.cs file you should instantiate your module like
MyModule mod = new MyModule(socket);

and run it in Debug mode.

Once everything is working properly, you can compile it in release mode and create a nice looking test app that instantiates it with the designer.

Hope that helps.

Thanks for the reply eduardo, I would test what you’ve said but I have stopped work on that module at the moment because I’ve hit a (similar) problem in a different project I’m working on with Gadgeteer. The “toolbox” problem is the same as when I had a Gadgeteer Application project in the same as a Gadgeteer Module project but happens even if I only have multiple Gadgeteer Application projects in the same solution:

I have ran into the same problem again though with a solution that has multiple Gadgeteer Application projects in. Basically, if I go to the designer all that is in the toolbox is the “Gadgeteer” section which has “Comment” and “Socket” in and for some strange reason the “Seeed” subsection but only with “Accelerometer” in!?

I have the Sytech, GHI and Seeed modules all installed but for some strange reason I can only access the Seeed Accelerometer if I have multiple Projects in the same Solution.

Any one had this problem or any ideas of what to do?

Anyone? Sorry for bumping but this is really hitting my productivity as I have to create new solutions for new tests. I guess I’ll try reinstall all the gadgeteer/.net mf stuff and try again.


It also a good idea to have one executable project per solution.

If your toolbox doesn’t show you the module, please right click on it and click show all… this will force it to reload everything, next scroll to the GHI Library and use your modules.

hope this helps…