May 8, 2018 4:30 pm

Early preview of Visual Studio support for Windows 10 on ARM development

By / Senior Program Manager, Windows Kernel Team

Today, we are pleased to announce that Visual Studio 15.8 Preview 1 contains an early preview of the SDK and tools to allow you to create your own 64-bit ARM (ARM64) apps. These tools answer the requests of many eager developers, and the development made possible with these tools represents the next step in the evolution of the Always Connected PC running Windows 10 on ARM.

Earlier this year, our partners released the first Always Connected PCs powered by Qualcomm Snapdragon 835 processors. These Always Connected PCs are thin, light, fast, and designed with instant-on 4G LTE connectivity and unprecedented battery life – now measured in days and weeks, not hours. Thanks to an x86 emulation layer, these Always Connected PCs also allow customers to tap into the wide ecosystem and legacy of Windows apps.

Developers interested in targeting this new ARM-based platform can use these early preview tools to build apps that run natively on ARM processors rather than relying on the emulation layer. While the algorithms that make emulation possible are engineered to optimize performance, running your app natively allows your customers to get the most performance and capability from your app on this new category of devices.

Since this is an early preview, there isn’t official support yet for the ARM64 apps built with these tools. You won’t be able to submit ARM64 packages to the Microsoft Store, though you can post preview versions of ARM64 Win32 apps to your website. Stay tuned to this blog for more information as more support becomes available. In the meantime, you can use these preview tools to get a head start on developing your ARM64 apps and provide feedback before the tools are finalized.

In this post we’ll look at how to set up your environment to build ARM64 apps, whether you’re building Universal Windows Platform (UWP) apps or C++ Win32 apps.

C++ UWP App Instructions

To build ARM64 UWP apps based on C++, start by setting up your development environment:

1) Download Visual Studio’s latest preview at https://www.visualstudio.com/vs/
2) Choose the “Universal Windows Platform development” workload
3) Select the “C++ Universal Windows Platform tools” optional component
4) In Individual Components, select “C++ Universal Windows Platform tools for ARM64”

The Visual Studio Installer should look like this when everything that is required is selected:

The Visual Studio Installer when everything that is required is selected.

After installing, you can get started on your app:

5) Open your C++ Project in Visual Studio, or create a new one
6) Right click on your Solution and select Properties, then navigate to Configuration Properties and select “Configuration Manager”
7) Under “Active solution platform:” select “<New…>” and call it ARM64. Copy settings from “ARM” and check to create new project platforms
8) If individual projects within the solution do not allow adding ARM64 as a platform, it may be because of dependencies. To learn more about the dependencies, you can modify those project files directly, copying the ARM configuration and modifying the platform to create an ARM64 configuration.
9) Save everything

ARM64 will now be available as a configuration for the project to build. Note that only Debug builds are supported for ARM64 at this time. You can create a package for sideloading or use remote debugging (see instructions) to run the app on a Windows 10 on ARM PC.

.NET Native UWP App Instructions

To build ARM64 UWP apps that rely on .NET Native, start by setting up your development environment.

1) Download Visual Studio’s latest preview at https://www.visualstudio.com/vs/preview/
2) Choose the “Universal Windows Platform development” workload
3) Open your project or create a new one. Note that the Target Platform Minimum Version must be set to at least “Windows 10 Fall Creators Update (Build 16299)”
4) Open the project file in your favorite editor and add a property group targeting ARM64. You can copy an existing property group, such as Debug|ARM, and modify it to support ARM64 with the changes highlighted below:

Sample code of Debug|ARM, and modify it to support ARM64.

The UseDotNetNativeToolchain property is required to enable the .NET Native toolchain.

5) Save the project file and reload it in Visual Studio
6) Right click on your Solution and select Properties, then navigate to Configuration Properties and select “Configuration Manager”
7) Under “Active solution platform:” select “<New…>” and call it ARM64. Copy settings from “ARM” and check to create new project platforms
8) Update to latest ARM64 version of the tools:

a. Right-click your project and select ‘Manage NuGet Packages…’
b. Ensure “Include Prerelease” is selected
c. Select the Microsoft.NETCore.UniversalWindowsPlatform package
d. Update to the following version: 6.2.0-Preview1-26502-02

ARM64 will now be available as a configuration for the project to build. Note that only Debug builds of ARM64 are supported at this time. You can create a package for sideloading or use remote debugging (see instructions) to run the app on a Windows 10 on ARM PC.

C++ Win32 App Instructions

Visual Studio 15.8 Preview 1 also includes an early level of support for rebuilding your C++ Win32 apps as ARM64 to run on Windows 10 on ARM.

1) Download Visual Studio’s latest preview at https://www.visualstudio.com/vs/preview/
2) Choose the “Desktop development with C++” workload
3) In Individual Components, select “Visual C++ compilers and libraries for ARM64”
4) Open your project in Visual Studio or create a new one
5) Right click on your Solution and select Properties, then navigate to Configuration Properties and select “Configuration Manager”
6) Under “Active solution platform:” select “<New…>” and call it ARM64. Copy settings from “ARM” and check to create new project platforms.
7) Save everything
8) Open the project file in your favorite editor. Under <PropertyGroup Label=”Globals”>, declare support for ARM64 by adding WindowsSDKDesktopARM64Support, as highlighted below:

Sample code depicting declaring support for ARM64 by adding WindowsSDKDesktopARM64Support.

9) Save and reload the project

You will now be able to build the project as ARM64 and either remote debug on a Windows 10 on ARM PC or copy over the EXE files and run them directly.

You can also use the Desktop Bridge (see instructions) to wrap the built ARM64 binaries into a Windows app package that can be installed on Windows 10 on ARM PCs.

Conclusion

We’re excited to open up Windows 10 on ARM to developers looking to build great apps compiled natively for the platform.

Visual Studio 15.8 Preview 1 provides an early preview of the full support that will be coming later this year. You can expect more updates as we work to bring these tools to an official release and open the Store to accept submissions for ARM64 packages.

We hope you give these tools a try on your apps and would love to hear from you. If you hit any issues, have any questions, or have feedback to share, head to our Windows 10 on ARM development page at http://aka.ms/Win10onARM or leave comments below.

Updated May 8, 2018 5:54 pm

Join the conversation

  1. One comment and one question regarding the newly added ARM support.

    Comment:
    – ARM64 native (win32) builds succeed per the instructions, but ARM(32) builds fail due to a missing library (atls.lib). The ARM version of this library appears to be missing from the VS15.8 distribution.

    Question:
    – How to debug the win32 executable?? I don’t see the ARM remote debugger in this VS distribution. In fact, I don’t see any of the remote debuggers. The documentation talks about a Xbox debugging mode, but the VS project properties is still using the traditional VS remote debugger options.

  2. A little more feedback,

    ARM64 console, SDK, and MFC apps all run beautifully (many thanks for your hard work on that!!!!!). ARM32 are probably not meant to ever run though. I modified the solution to build them but (by adding the properties for ARM), but,
    – The windows apps don’t build due to a missing import library (atls.lib)
    – Console apps build, but don’t run. This is, I assume, due to the WOW64 layer being hijacked to support x86 emulation?

    Also, ARM64 ATL windows apps don’t run. This may be due to the assembly language thunks used in the Windows classes (need to re-write them for ARM). An exception is recorded in the event log when the app tries to run.

    Any insight on remote debugging is still appreciated..

    • As you’ve suspected, building ARM32 win32 apps is not supported with this preview. We recommend at the moment that developers with win32 code that must be 32-bit continue to run it as x86, but we’ll take the feedback around ARM32 into account.

      For remote debugging win32 apps, we will have instructions posted soon. In short, if you use remote debugging on an ARM64 device using an ARM64 UWP, that will install the ARM64 remote debugger. You can then run %ProgramData%\DeveloperTools\VSRemoteTools\arm64\msvsmon.exe on the ARM64 device to enable remote debugging ARM64 win32 apps. The required steps will get more straightforward as we get later in the ARM64 development preview.

      Thank you for reporting the issue with ARM64 ATL apps, it will be addressed in a future preview.

      Let us know if you have any more feedback or hit any other issues!