Last modified August 15, 2014
Throughout our documentation, we often include program examples that you can cut and paste into Visual Studio (VS). When you create a New Gadgeteer Project in VS, VS sets the default namespace for your project based on your project name. The Gadgeteer Designer creates a file named "Program.generated.cs" that uses this default namespace.
When the example code is a complete gadgeteer program, you will select it, and copy it. Then you will select all the lines in Program.cs in and paste the example code over the code in VS. Right away you will almost always have a problem, the namespace in Program.generated.cs will not match the namespace from the example code:
Always change the namespace in Program.cs to match the one in Program.generated.cs. Do not change Program.generated.cs. This is because the namespace in Program.generated.cs is also used for any resources you may add to the program: