Netduino没有"Console.WriteLine",控制台在当前上下文中不存在

wma*_*but 11 .net .net-micro-framework netduino

我似乎无法将我非常简单的netduino程序写入调试控制台; VS抛出错误

当前上下文中不存在名称"Console"

什么可能导致它不存在的任何想法?

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);
        }

    }

}
}
Run Code Online (Sandbox Code Playgroud)

编辑

Debug.Print 确实有效

kfu*_*ang 12

嵌入式设备上没有控制台.因此,正如您所发现的那样,您必须使用Debug.Print.