Trouble getting started with TinyCLR

I tried to build and deploy Blinky program on a new PandaIII after I installed G80 Firmware.ghi

namespace TinyCLRApplication3
{
    public class Program
    {
        public static GpioPin LED;
        public static void Main()
        {
            var gpio = GpioController.GetDefault(); // Get the default GPIO controller 
            LED = gpio.OpenPin(FEZPandaIII.Gpio.Led2);
            LED.SetDriveMode(GpioPinDriveMode.Output);
            while (true)
            {
                LED.Write(GpioPinValue.High);
                Debug.WriteLine("Switch to high");
                Thread.Sleep(300);
                LED.Write(GpioPinValue.Low);
                Debug.WriteLine("Switch to low");
                Thread.Sleep(300);
            }
        }
    }
}

I get the following message output:

Found debugger!

Create TS.

Loading Deployment Assemblies.

Attaching deployed file.

Assembly: GHIElectronics.TinyCLR.Core (0.1.0.0) Attaching deployed file.

Assembly: TinyCLRApplication3 (1.0.0.0) Resolving.

Link failure: some assembly references cannot be resolved!!

Assembly: TinyCLRApplication3 (1.0.0.0) needs assembly ‘GHIElectronics.TinyCLR.Devices’ (0.1.0.0)

Error: a3000000

Waiting for debug commands…

The program ‘[14] TinyCLR application: Managed’ has exited with code 0 (0x0).

I have removed references and readded a couple of times. I have cleaned and rebuilt project. Any other ideas?

How did you install your nuget packages?

I had to use the VS nuget manager command line to install them, before I could use the references.

@ mtylerjr -
I placed the two packages in a folder on my desktop. I then used the nuget manager within VS2017 to added a path to this directory.

@ mtylerjr -

I was able to get it to work. I used the “clear all caches” button within the Nuget Manager General section.

Thanks for your help.

2 Likes