Welcome to the exciting world of Windows IoT! This guide will walk you through the essential steps to create and run your very first application on a Windows IoT device.
Before you begin, ensure you have the following:
If you haven't already, download and install Visual Studio 2022. During installation, make sure to select the "Universal Windows Platform development" workload.
Ensure your Windows IoT device is properly set up with the latest Windows IoT Core image and connected to your network. You'll need its IP address.
Open Visual Studio 2022.
Click on "Create a new project". Search for "Blank App, UWP (C++/WinRT)" or "Blank App, UWP (C#)" and select the appropriate template.
For beginners, we recommend starting with the C# template.
Name your project something descriptive, like "MyFirstIoTApp", and choose a location to save it. Click "Create".
Let's create a simple app that displays a message. We'll use C# for this example.
Open the MainPage.xaml file in your project. Replace its contents with the following XAML:
<Page
x:Class="MyFirstIoTApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyFirstIoTApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Padding="20">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Hello, Windows IoT!"
FontSize="48"
FontWeight="Bold"
HorizontalAlignment="Center"
Foreground="#0078d4"/>
<TextBlock Text="Your first app is running!"
FontSize="24"
HorizontalAlignment="Center"
Margin="0,15,0,0"
Foreground="#333"/>
</StackPanel>
</Grid>
</Page>
Open the MainPage.xaml.cs file. The default code is usually sufficient for a simple app like this, as the UI is defined entirely in XAML.
In the Visual Studio toolbar, change the debug target from "Local Machine" to "Remote Machine".

A dialog box will appear. Enter the IP address of your Windows IoT device.
Select "Universal (Unencrypted Authentication)" if your device is configured for it, or "Username/Password Authentication" if you've set up credentials. Click "Refresh" if you need to rediscover the device.
Press the F5 key or click the "Start Debugging" button (the green play icon) in Visual Studio.
Visual Studio will build and deploy your application to the Windows IoT device. After a few moments, you should see your "Hello, Windows IoT!" message appear on the device's display.
Congratulations on running your first Windows IoT app! From here, you can explore: