As mentioned in the Blinky Headless tutorial, you can have multiple projects inside a single solution. We will be adding the BlinkyHeaded project to the Blinky solution, alongside the BlinkyHeadless project.
To get started, follow thse steps:
- In the Solution Explorer, right-click on Solution Blinky, and place the cursor over Add. This will bring up another popup menu. Select New Project
- The Add New Project window will open. On the left, navigate to Installed > Visual C# > Windows > Universal, and select Blank App (Universal Windows)
- Give the project a name (“BlinkyHeaded”).
- Leave the Location path alone. Visual Studio will automatically put the project inside the Blinky Solution folder.
- Click OK
A new dialog window will open, asking you to choose the target and minimum versions your BlinkyHeaded app will support. Choose the target and Minimum versions to match the version of Windows IoT Core you have running on your Raspberry Pi. If you’re not sure, check the main HDMI display or Device Portal to see the installed version.
Click OK and the BlinkyHeaded project will appear in the Blinky Solution:
Even though we used a Windows IoT template for creating our solution, we still need to add the IoT framework to our BlinkyHeaded project, the same as we did in BlinkyHeadless. In the Solution Explorer, right click on the line that says References, and select Add Reference…
This will bring up the References Manager. In the References Manager Window, navigate to Universal Windows > Extensions. In the list, find Windows IoT Extensions for the UWP. There may be more than one item with this name. To the right of each item, you’ll see a version number. Select the items that match the Target and Minimum versions you entered earlier.
When you select an item, a checkbox will appear to the left of the item. Check the box for each item you select.
Click OK to add the references to your project.
One more thing to do: We need to tell Visual Studio that we are now working on BlinkyHeaded. Right-click on BlinkyHeaded, and select Set as StartUp Project in the popup.