What's new in Visual Studio (and related tools) for UWP apps
Blog|by Mary Branscombe|10 September 2017
Microsoft continues to add more features to what UWP apps can do in Windows 10, and the tools for creating them; at the Build conference we saw updated APIs for working with ink and Surface Dial, new ways of connecting UWP apps to information and services on other devices, as well as a new way to quickly put together the basic framework for a new UWP app.
Visual Studio on Windows continues to be the main way to work with UWP apps; Xamarin Forms has supported UWP for some time and you can use Visual Studio Team Services to build UWP apps in the cloud, but Visual Studio for Mac doesn’t let you create UWP apps on a Mac (although developers who are interested in that can vote for it here. If you’re using the new SDKs in the Windows 10 Creators Update, you need to make sure you have the preview release of Visual Studio 2017 which lets you run multiple versions of both Visual Studio and the Windows SDK side by side, so you can add preview SDKs on a machine you’re using to build for production and submit to the Store.
You can already break your UWP app up into components using resource packages and app extensions; with Creators Update, you can have optional packages that users can buy from you or a third party and use inside the app (think extra filters for a graphics app or sticker packs for a messaging app). Optional packages can be used by more than one app. You can also break your app up into Content Group Maps to support streaming installations – pick the code that’s absolutely necessary for the app to run and users can start using the app while the rest of your code (the deferred content) downloads. App extensions mean splitting your code into multiple projects; content groups can all be part of the same Visual Studio project.
Now that NuGet is integrated with MSBuild, Visual Studio 2017 defaults to the new NuGet package reference model for new projects targeting the Creators Update SDK, so you view and manage NuGet package references from the MSBuild project file rather than a separate project.json external file that you have to modify when you change NuGet dependencies. If you use a library in multiple projects, instead of updating every project to tell it about any changes in that library, you can change a central reference. You can also switch between the debug and release versions of a package using conditional dependencies. This model is showing up for UWP apps now, initially for new apps though a later preview will migrate existing apps for you, but it’s also coming for .NET and Xamarin.
The .NET Native Compiler is now a NuGet package, so it will get updated even if you don’t update Visual Studio; a future preview will default to using the 5.3.x UWP NuGet package to get the latest compiler version.
UWP will support .NET Standard 2.0 later this year, which will add a lot of APIs that .NET developers can use and UWP developers haven’t had access to -.NET Standrad has 20,000 more APIs than .NET Standard 1.0 – which will also make it easier to share code between proiects
Slicker apps, quicker
The second most common request the Visual Studio team gets from UWP developers is to get templates for making new apps, instead of having to start with a blank project. The Windows Template Studio is a Visual Studio extension that lets you pick the type of project and the framework you want to code with (currently Code behind, MVVM or MVVM Light but more frameworks like Prism and Caliburn.Micro are likely to show up soon). As you click through to add pages and features, like background tasks and notifications, you can see what dependencies and licences those bring with them. If you add a Settings page, the wizard adds in storage for those settings, if you add toasts and notifications, it shows you how to connect to the Azure notification hub, if you add in a map page the wizard tells you how to get a Bing Maps API key. Clint Rutkas xxxx calls it “a strong starting point, not a finished application”; when you choose a background task you still have to go in and choose which background task trigger to use, but the ‘to do’ list at the common of the project shows the tasks you need to complete, as well as useful hints like adding the URL for your privacy policy.
Microsoft wasn’t the only one showing UWP tools at Build; Adobe also showed the latest update to the Windows version of XD (Experience Design), which now has templates for UWP apps.
The visual language of UWP apps is also changing. The Creators Update SDK includes interface options that are part of the new Fluent design language, like custom settings for lighting using XAML, so you can choose how parts of your UI are lit to subtly highlight the most relevant choice in a list or a contextual action that’s available. The other elements of this design language will be coming in the Fall Creators Update, like the acrylic material that makes part of a window transparent; other materials are planned, including sound and haptics as well as visual elements, but you can also create your own custom XAML brushes for materials too. Other Fluent concepts like shapes and motion for transitions are further off; the new Interaction Tracker tool will support patterns like pull to refresh in future Windows Insider builds. Support for SVG in XAML images is new; today that’s just for static images, but support for SVG animation is in development. As these new interface elements become available, the UI Diagnostic tool in Visual Studio is going to get more useful for showing you how responsive your app is, and whether you’re doing things like hiding toolbars on screen but still setting them to be rendered, which means hiding them doesn’t speed up the app launch time).
Also in the Fall Creators Update are new APIs for Project Rome (technology that uses the Microsoft Graph to let UWP apps connect to information on other Windows devices, as well as iOS and Android): Device Discovery, Remote Launch, Remote App Services for messaging and User Activity for working with the new Windows timeline and Cortana notifications. If you want to start working with the new APIs, the UserActivity API for UWP and Activity REST API in Microsoft Graph are in the current Fast Ring Windows Insider builds; the timeline, the .NET Standard cross platform library and the Extended UserActivity API (to read and delete activities) are still in development.
Contact Grey Matter
If you have any questions or want some extra information, complete the form below and one of the team will be in touch ASAP. If you have a specific use case, please let us know and we'll help you find the right solution faster.
By submitting this form you are agreeing to our Privacy Policy and Website Terms of Use.
Mary Branscombe
Mary Branscombe is a freelance tech journalist. Mary has been a technology writer for nearly two decades, covering everything from early versions of Windows and Office to the first smartphones, the arrival of the web and most things in between.
Related News
School Closes Due to Ransomware Attack
It has been reported that Charles Darwin School in Kent has had to close its doors to students and staff while they sort out a severe cyber incident. The school suffered a ransomware attack and is working with the ICO...
Patch Alert Issued for Veeam
A critical patch alert has been issued for Veeam Backup & Replication software. The alert addresses a severe vulnerability, tracked as CVE-2024-40711, which allows unauthenticated remote code execution. This flaw could enable attackers to take full control of affected systems...
Are you ready for DORA?
Financial organisations operating in the EU have until 17 January 2025 to comply Understanding the Digital Operational Resilience Act (DORA) According to CIO Dive, financial services are 300 times more likely to be hit by cyberattacks than other sectors. This...
JavaScript Day 2024
Thu 24 October 2024 2:00 pm - 6:00 pm GMT
Are you ready to dive deep into the world of JavaScript and TypeScript? Mark your calendars for 24 October 2024 because JetBrains JavaScript Day 2024 is back for its fourth year, and it’s going to be bigger and better than...