The .Net Microframework (NETMF) doesn’t include the eponymous Console.WriteLine, which can be incredibly useful in getting debug messages to the console. However, it does have Debug.Print which is essentially the same thing.

Microsoft.SPOT Namespace

In order to use Debug.Print, you have to add a reference to the Microsoft.SPOT.Native dll. Additionally, it may be useful to add a using statement so that you don’t have to use the fully qualified name, as in the following:

using Microsoft.SPOT;


    public void DoSomething()
        Debug.Print("Got here!");

The debug output can then be seen in the output window in Visual Studio:


These docs are open source. If you find an issue, please file a bug, or send us a pull request. And if you want to contribute, we'd love that too!