Does not recoginize namespace and components

I am running NETMF 4.1

I uploaded a C# program and the complier found 1 error and 3 warnings as follows:

The error is the followed referenced component could not be found

  using Gadgeteer.Modules.[b]GHIElectronics[/b];

The 3 warnings are the following referenced components could not be found:


I performed a “add reference”. While I found the above 3 items, they would not add when I selected them and hit OK

Any help would be appreciated.

Your question is missing one or more of these details:
The name of the product.
The version of the SDK you are using
(Generated by QuickReply)

Hope this is what you are looking for . . .
GHI FEZ Spider Kit with T-35 Display
Visual Studio 2010 Express, C#
.Net Micro Framework SDK 4.1

using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;

using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
using Microsoft.SPOT.Input;

namespace WPFWindowExample
    public partial class Program
        void ProgramStarted()

            // Do one-time tasks here
            Debug.Print("Program Started");

        private Bitmap normalButton;
        private Bitmap pressedButton;
        private Image imgButton;
        private Text txtMessage;

        private void SetupWindow()
            Font baseFont = Resources.GetFont(Resources.FontResources.NinaB);
            normalButton = Resources.GetBitmap(Resources.BitmapResources.NormalButton);
            pressedButton = Resources.GetBitmap(Resources.BitmapResources.PressedButton);

            Window window = display.WPFWindow;
            Canvas canvas = new Canvas();
            window.Child = canvas;

            imgButton = new Image(normalButton);
            imgButton.TouchDown += new TouchEventHandler(imgButton_TouchDown);
            imgButton.TouchUp += new TouchEventHandler(imgButton_TouchUp);
            Canvas.SetTop(imgButton, 50);
            Canvas.SetLeft(imgButton, 90);

            txtMessage = new Text(baseFont, "Button is NOT PRESSED");
            Canvas.SetTop(txtMessage, 200);
            Canvas.SetLeft(txtMessage, 90);

        private void imgButton_TouchDown(object sender, TouchEventArgs e)
            imgButton.Bitmap = pressedButton;
            txtMessage.TextContent = "Button is PRESSED";
        private void imgButton_TouchUp(object sender, TouchEventArgs e)
            imgButton.Bitmap = normalButton;
            txtMessage.TextContent = "Button is NOT PRESSED";

When creating a project, start with gadgeteer project not netmf. The steps are detailed in getting started guide.

Did you build a starting Gadgeteer program using the designer and then added this code?
Usually, all of the references are automatically added when you use the designer.

Starting with a gadgeteer project worked. However, there were a lot of changes that still needed to be made to the orginal code. Thank you for your help!

Using code tags will make your post more readable. This can be done in two ways:[ol]
Click the “101010” icon and paste your code between the

 tags or...
Select the code within your post and click the "101010" icon.[/ol]
(Generated by QuickReply)

@ devhammer -
Thanks, I am new to posting comments. I appriciate your patience.

Always happy to help. :slight_smile:

I’ve received patience aplenty from the other peeps here on the forum myself…