Microsoft Build 2024 - Sessions
Introducing the Next Generation of Windows on ARM - Ivette Carreras, Marcus Perryman & Jamshed Damkewala
Ivette Carreras
It is such an exciting time with the devices that are being shipped using Windows on ARM with Copilot+ PCs, there has been an immense effort to make it a new innovative era on Windows with Windows leading in this new category of PCs. Windows Copilot+ PCs devices are result of a strong partnership between Qualcomm, Microsoft and OEMs and is a monumental release with no compromises on device form factors, performance and experiences with leading battery life for all day use with the industry's most powerful NPU for developers to build incredible AI experiences. Starts with Snapdragon X Elite SoC which is an integrated NPU with 45 TOPS with 12 CPU cores up to 3.8 GHz with integrated GPU supporting DirectX 12 with 4.6 TFLOPS and LPDDR5x memory with 8448 MT/s. Data never leaves the device which is critical to security and using the hardware right there on the device.
Running Windows 11 with a compiler leveraging the Armv8 instruction set and rebuilt Windows components and runtimes to boost CPU performance and using profiler guided optimisations for system binaries to allow customer to get best experience with what they care about. Emulation is a critical aspect on this platform but with the latest Windows 11 update there is emulation with Prism which is twice as fast compared to previous operating systems and can do well such as games like Balder's Gate 3 which is a heavy game supporting high frame rates.
Windows 11 integrated NPU with the latest Windows update fully integrates it into operating system. Microsoft Complete Driver Model framework support with great thread prioritisation and task scheduling and will be shipping Windows AI models ready for applications to use with simple API calls such as Phi-Silica that can be used with simple API calls. Inferencing on the NPU is possible using DirectML in applications using the ONNX runtime to target the NPU. Power & Thermals with Arm allows performance per watt innovation, all day battery life along with thin and quiet designs which is useful for creators.
Marcus Perryman
Their focus is on the Windows on Arm ecosystem and how they can empower exceptional customer experiences and without compromise of the silicon upon Windows is running. Qualcomm announced the Snapdragon Dev Kit which is the fastest Windows on ARM device just for developers with a dedicated developer edition of the Snapdragon X Elite SoC along with 12-core Qualcomm Oryon CPU, 32GB of LPDDR5x RAM, 512GB fast M2 drive, 80W system architecture, 3xUSB4-CD, 2xUSB3.2-A, RJ45, HDMI along with supporting three external displays and 20% ocean bound plastic enclosure. For developers they need the right tools at their fingertips with the Arm development ecosystem with the pace of developer middleware increasing in each of the three areas of development, deployment, and dependencies. Snapdragon Dev Kit is twice as fast as the previous Arm-based Windows Dev Kit 2023.
Jamshed Damkewala
How developers can build highly performant code so can already do AnyCPU apps as building apps per architecture is expensive along with having two build targets, two flavours to package, publish and ship along with two things for customers to download and deploy. .NET provides the AnyCPU target architecture, and the runtime figures out what architecture app is launched as based on the OS architecture. Clipchamp is a .NET application and is build as Any CPU but when running on an Arm device it still runs as x64, for compatibility reasons Any CPU apps don't run automatically as Arm so for greater compatibility for features it launches as x64 for example with Clipchamp which is a .NET application and you can add supported architectures as ARM64 and this will ensure the application runs under the correct architecture.
Container App Deployment is a popular way of packaging and deploying an application as can have a streamlined development workflow, supports isolation and security, efficient resource utilisation, portability, collaboration, and reproducibility plus developers want to deploy apps to Docker but until now Docker has not been available for Windows on Arm. Docker Desktop is now fully available for Windows on Arm, it is something that so many people have been asking for. Docker Desktop simplifies development as it allows you to build different containers for different architectures. Developers love their laptops and the new Copilot + AI PCs and with Docker Desktop it allows them to develop their best applications and is something developers have been asking for a long time.
There are also .NET Runtime Performance Improvements take advantage of a 17th register the Current Program Status Register which keeps track of things the process needs to know like conditional states and the last four bits support conditional operations.
Developer experience improvements in Windows - Kayla Cinnamon & Sharla Soennichsen
Kayla's team has delivered a series of products including Windows Terminal, Windows Subsystem for Linux, Dev Home, PowerToys and WinGet. They work fully in the open and have had contributions to make these features better. PowerToys has this feature called projects to get in your workflow instantly and get a Window layout repeatability to get into a project or task very quickly and this works well with multiple Windows and if go from work to home can have different projects and screen resolutions, it can also do command line arguments so can customise the way applications open.
Dev Home is the one-stop shop to get everything you need to get started with a customisation dashboard that is fully extensible, Dev Home allows you to connect to your GitHub account to show information in the Dashboard from GitHub but there's also CPU, GPU and Azure widgets available. Some PowerToys are being deployed into DevHome such as Hosts File Editor, Registry Preview and Environment Variables Editor but other utilities could be deployed this way too.
Dev Home has a new Environments page which allows extensibility when creating or configuring environments with Dev Boxes or Hyper-V environments and they are all brought together for launching in Dev Home and you can also create new Environments such as Hyper-V and Dev Box but there are also plans to add additional extension types for environments developers are working on, but it is open-source so additional types could be added in future.
Machine Configuration allows you to set up an environment in one go including Xbox workloads for game development along with cloning repositories and installing needed applications. You can specify the ideal state that you want on your machine to repeat setup of cloning application from GitHub and setting up you can do this which uses a .winget file which can be associated with either WinGet or DevHome which will give a view to automatically run that configuration file along with a summary of what will be done which makes it easier to read and get started with configuration files.
Windows has some improvements to File Explorer coming soon which is source control integration which has columns for last change message, version status but can also add other columns depending on what information you want at a glance and make it easy to keep tabs on a repository. File Explorer will also show the branch name including when on main to help prevent committing on main branch.
New Windows customisation gives developers agencies over their machine with settings for customising Windows with settings you can toggle with settings for File Explorer including showing file extensions, showing hidden and system files and showing files after an extraction is complete. You can contribute to this feature as this is open source or can open up issues to suggest more features. There is also a feature to quiet background processes that are intended for development or not so you can give your CPU resources where it matters to get most performance out of your machine and work more quickly.
Dev Drive experience will be improved, which runs on ReFS, will give a performance boost for I/O scenarios and is a whole lot faster. You can get Dev Drive insights which includes how to improve performance and can move package caches to Dev Drive which will deliver a performance boost, and these suggestions will help improve performance. Dev Drive is being optimised to be faster in general and features including block cloning along with much faster copying of a 10GB file from 13 seconds to 0.1 seconds as it is copying metadata rather than bit by bit.
Command Line improvements include with WinGet configure where you can perform operations such as creating a Windows sandbox and bootstrap WinGet and then run an additional configuration file to configure that environment with a PowerShell script to adjust Windows settings such as seconds in the clock or set dark mode. You can test configuration files and validate that these works. WinGet Configure also supports export in an upcoming release which allows you to export the settings of your application to generate a configuration file, not just the command to install the application but also to configure the settings.
If you close a Command Line window you can get terminal buffer content restore including all commands and output from previous commands that have been executed. There is also environment path refresh when you automatically install an executable you can stay in your flow as the command line window will be updated for any changes to the path.
Sudo for Windows can now be used with the Windows Insider build and is in the For developers section where you can enable sudo, which allows you to run a command elevated without having to have the Window elevated, so you can run commands as admin and get remain in your flow and don't have to keep restarted with admin and the window itself remains without admin itself afterwards.
Visual Studio extension for Windows Sandbox will be coming in the future where you can launch a project on a local machine and when debugging it behaves normally so to test it has all dependencies you can start a Windows Sandbox and target the sandbox when debugging and can see if any dependencies are not being installed or if something is missing and see if everything is working as expected to test in a clean environment. You can quickly and easily test on a clean device and the extension will be available in the next few months.
Navigating Win32 App Development with WinUI and WPF - Chigusa Sansen & Jeffrey Stall
Microsoft has modernised technology in WPF and WinUI and how you can build great Windows 10 and Windows 11 applications. Microsoft's investments in client development in Windows Native with WinUI 3, WinForms and WPF for Cross Platform Native with React Native and .NET MAUI, Hybrid apps with Blazor Hybrid and WebView2 and for Web with PWA and Blazor Web Apps. Native platform offerings for XAML developers are WinUI 3 and WPF, both WinUI 3 and WPF are great choices are actively developed and are XAML based Microsoft backed technologies with their own unique strengths.
WinUI
WinUI powers key experience on Windows and came from Universal Windows Platform and today WinUI is technology of choice for new features on Windows including Windows Recall feature from Copilot + PCs. WinUI is optimised for modern experiences and hardware and have flexibility for language and CPU support such as C#, C++, x64, x86 and arm featuring modern UI with usability built in. For UWP apps that want take advantage of arm64 or to take advantage of new features WinUI 3 is easiest option to modernise apps going forward. If you are new to Windows app development as WinUI is a great choice if starting new plus it is easier than ever to get started as there is now a new Windows app development workload in Visual Studio to build applications for the Windows platform using WinUI with C# or C++. There is also an improved File | New Project where things like title bar works correctly coming in the next few weeks.
WinUI applications include Photos which is written in WInUI 3 and has a great scrolling experience, and this is also used in the Gallery Tab in File Explorer which is also written in WinUI 3. You can find code samples and documentation with the WinUI 3 Gallery including recently added samples and recently updated samples which includes any new functionality. ItemsView control is used in the Photos app and Gallery in File Explorer and handles different sizes of items and for very long lists, there is also an Annotated Scroll Bar which is also used in those applications. You can get the source code for the pages that have been implemented in the WinUI 3 Gallery. Scroll View allows everything to be customised such as animations with composition keyframe animations when scrolling between images in a list. It is important to be able to run the application down-level such as on Windows Server 2019 which can support WinUI3 except any specific features that are in later versions of Windows such as rounded corners. WinUI 3 has great performance with ItemsView, ScrollView, TreeViews along with Flyouts and Resource lookups and will be supporting .NET 8 AoT with 45% smaller distribution and 50% faster launch and all of WinUI 3 is native so only optimising your own C# code.
Choosing the technology for your native Windows app, Microsoft Photos chose WinUI 3 as is a natural evolution of UWP and if you can build a native app, you certainly should and the power and elegance of XAML makes anything possible. You can have native code execution and hardware acceleration for complex UI rendering using WPF. With XAML islands you can replace parts of an application with modern components where needed. C# and WPF allows applications to run easily such as Arm and NPU was easier than expected with C# and WPF being mature and well supported so don't have to wrestle with frameworks when developing applications. Photos and File Explorer chose WinUI to align closely with Windows.
WPF
Windows Presentation Foundation or WPF has been around for over fifteen years and is industry proven and is reliable and stable, it has a vibrant ecosystem with rich and stable support to help create applications along with documentation and tutorials created over the years and has great framework support and is written in C# for C# and can modernise existing applications. There is a new WPF Gallery application as part of .NET 9 and you can update older WPF applications to get the new look and feel for modern Windows Applications. You can include the Fluent resources in a WPF application to get the new look-and-feel easily with Windows 11 theming. This will be coming to .NET 9 in November, but preview releases are available now.
What to use?
If don't know where to start and want app to align visually and functionality and be on cutting edge on what Windows has to offer and multiple CPU support, then WinUI is your choice, but WPF is for ecosystem and great C# support. Developers have raised some issues such as developers cannot afford to rewrite applications all at once, applications need to support multiple Windows versions and need the same behaviour on all OS versions and apps need to control when their dependencies update and don't want functionality changed without being able to verify their own application code.
Windows Ecosystem
Windows App ecosystem includes Window Platform SDK which needs features of Windows supported by that version of Windows installed. Windows App SDK APIs are determined by the application so developers can control which APIs they use. Windows App SDK enables incremental adoption where can focus on piecemeal updates and integrates different, modern content together. It prioritises predictable consistency where can be down-level to Windows 10 RS5+ and Windows Server 2019+ LTSC with no admin install needed and fully side-by-side and supports controlled updates where apps verify updates and deploy on their timing of Windows App SDK releases, developers can validate their app and decide when to move forward.
Packaging
Benefits of packaging makes it easy to use Windows App SDK but unpackaged apps can use Windows App SDK so don't need to have app packaged or on the store but it is easier and has other benefits such as app identities for APIs like share targets and notifications and also supports better privacy and security for per-app settings, packaging makes for faster installs and totally clean uninstalls and can manage dependencies. You can use Windows App SDK APIs in WPF by making it packaged. You can use the target OS version to use all the latest APIs and the supported OS version can be set to 10.0.17763.0 which is Windows 10 RS5. You can then add the Windows App SDK but then need to remove AnyCPU and legacy arm targets.
Platform Features
Windows App SDK also supports widgets and application lifecycle, scene graph and Windows Copilot Library. Windows Copilot library makes it easy to develop AI experiences on Windows with the new Windows App SDK 1.6 APIs with over forty on-device AI models with state-of-the-art algorithms and Windows Copilot Runtime efficiently enables multiple apps using models and hardware with features such as Windows Studio effects. You can write applications using raw Windows App SDK from C++ without any UI framework and even in C#. There is also a whole 3D engine in WinUI but will be possible to add 3D content using Windows App SDK which allows you can bring in Custom Content more easily in Windows App SDK compared to DirectX.