Any Windows on Arm computer which has the required tools installed can be used for this Learning Path.
Follow the links to install the required tools.
Install the .NET desktop development workload component with Visual Studio. You can do this either during the initial installation or modify your existing installation.
To modify your existing installation of Visual Studio:
Open the Windows Start Menu. Search for Visual Studio Installer and launch it.
Select Modify
.
.NET desktop development
checkbox and then select Modify
.After the installation completes, close the installer.
This Learning Path uses a sample Windows Presentation Foundation (WPF) application that solves a well-known algorithmic problem: the Traveling Salesman Problem .
This sample application is chosen because it is CPU intensive, and makes use of graphics to test the capabilities of WPF in .NET 6.
The sample application source code is configured to build and compile using .NET 5. In this Learning Path, you will port the application to .NET 6 which includes support for WPF on Arm.
To compile and run this WPF application using .NET 6 on a Windows on Arm device, follow the steps outlined below:
Open Visual Studio
on your Windows on Arm computer.
Select Clone a repository
from the Get Started options in Visual Studio as shown in the image below:
In the Repository location
field enter https://github.com/GVerelst/TravelingSalesman
Enter an appropriate Path
where you would like to clone the repository on your machine. In this example, it is C:\TravelingSalesman
. Then select Clone
.
After the repository is cloned, 3 projects are displayed in the Solution Explorer
pane.
Right click on the TSP.WPF
project and select Properties
.
In the General
section, change the Target framework
from .NET 5.0
to .NET 6.0
as shown in the image:
Save the changes to the project (Ctrl+S)
In Solution Explorer, right-click the TSP.WPF
project and select Publish
. The Publish dialog appears.
Under Target, click Folder then click Next, as shown in the following image:
Select a location to store the generated binaries. You can leave the default folder selection as is and select Finish
.
The initial publish profile is created. Select Close
.
Click on Show all settings
to display the Profile settings dialog.
Target runtime
from Portable
to win-arm64
and click Save
.Open Folder
to view the generated binaries including the TSP.WPF
application.Now that you have built the sample application for Windows on Arm, you are ready to run the executable.
Double-click TSP.WPF
to run the application. The application starts as shown:
You can change the inputs on the application as needed. Click Generate Path
followed by Start
to see the application run.
You have successfully run a WPF application built with the .NET 6 framework on a Windows on Arm device.