Netduino no "Console.WriteLine", Console does not exist in current context

wmarbut picture wmarbut · Jan 10, 2013 · Viewed 12.5k times · Source

I cannot seem to get my very simple netduino program to write to the debug console; VS throws an error

The name 'Console' does not exist in the current context

Any ideas what might cause it to not exist?

using System;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;

namespace LumenReader
{
public class Program
{
    public static void Main()
    {

        AnalogInput photoResistor = new AnalogInput(Pins.GPIO_PIN_A0);
        int photoVolt;
        while (true)
        {
            photoVolt = photoResistor.Read();
            Console.WriteLine(photoVolt);
        }

    }

}
}

Edit

Debug.Print does work

Answer

kfuglsang picture kfuglsang · Jan 10, 2013

There is no Console on embedded devices. Hence, as you found, you must use Debug.Print.