Running BlinkyHeadless

Remote Machine

From the Visual Studio standpoint, the Raspberry Pi is a Remote Machine. So, we have to make an association between Visual Studio and the remote machine. In the Visual Studio Toolbar, there should be a button labeled Device. On the right-hand side of this button is a little down-arrow. Click the down-arrow and a drop-down will open.

Select Remote Machine, and another pop-up window will open. This is the place where you find your Raspberry Pi and make the remote-machine association with Visual Studio. The Raspberry Pi should be automatically found. Click on the arrow next to Auto Detected to open up the panel, and click Select.

If you have to do a manual configuration for some reason, enter the name of the Raspberry Pi, and select Universal for the Authentication Mode.

If you have a problem here, it’s because your Raspberry Pi isn’t visible on the network. Visual Studio can’t see it. Go back and make sure your Pi is configured correctly and is visible to Device Portal.

You can also get to this window by going through the Solution Explorer. Find the Properties entry in your project and double click on it. The Project Properties window will open. On the left of the panel, select Debug. In Start Options, select Remote Machine, and then click the Find… button.

Run

To run your app, press the large green arrow in the toolbar in the box labeled Remote Machine

The app will be compiled and downloaded to the Raspberry pi, and it should begin to run. The first time you run your app, this process can take a couple of minutes. Subsequently, your app will download and run much quicker.

Click on the green arrow – if all goes well, the LED attached to GPIO 5 will begin to blink!

If your code has syntax errors, then the error list will appear in the panel below the main code panel. Click on the tab titled Error List to see the error reports. You’ll also see a red underline in the code at the point where the error was detected.

In this example, we forgot to put a semicolon at the end of line 25:

if you reboot your Raspberry Pi, Visual Studio may have trouble re-connecting to the Pi. You may see strange "deployment" errors. If this happens, exit and restart Visual Studio after the Pi has finished rebooting.
This guide was first published on Aug 03, 2016. It was last updated on Aug 03, 2016. This page (Running BlinkyHeadless) was last updated on Nov 15, 2019.