Today at //BUILD we are making an update available to the Visual Studio Tools for Universal Windows apps. Windows 10 is an exciting release for developers, with support for Universal Windows apps that run across all Windows 10 devices – on the phone in your pocket, the tablet or laptop in your bag, the PC on your desk, the Xbox console in your living room, the Surface Hub, and IoT devices. Only one tool is needed to target them all: Visual Studio 2015.
Key features of Visual Studio 2015 RC include:
- Quickly build an app to run everywhere. Visual Studio 2015 provides a template for your app to run on every Windows 10 device. You can tailor your experience for any device using built-in platform capabilities.
- Easily test and diagnose. Device previews allow you to preview your UX adapting in the designer. Emulators and powerful visual diagnostic tools let you test it at run time.
- Apps run faster. .NET native can make apps start up to 60% faster.
- Find out how well your app is doing in the real world. App Insights gives you real time feedback on what your users are doing with your app.
In this post, we’ll take a look at a few of the highlights of the Visual Studio Tools for Universal Windows Apps
Creating Universal Windows apps
With Windows 10, it is now possible to have just a single universal app project that when deployed can run on all Windows 10 devices like PC, Phone, Tablet, or Xbox.
First download and install Visual Studio Tools and the Windows 10 SDK.
Reach Android, iOS, and Windows Users
Creating Adaptive UX in the XAML Designer
Windows 10 provides the ability to use a single UI that can adapt from small to large screens to reach the maximum range of devices with your app, with the best possible user experience. This means that your universal app projects no longer require separate projects or UI definitions for small and large screens, although we will still provide the option of separate UI definitions should you prefer it.
In the example below a different layout is used for the desktop and the phone app.
You can then use the new device toolbar above the designer to preview your layout on a range of devices.
Tailoring your app for a particular device
New Windows 10 API contracts and the extension SDKs allow you to adapt your code at runtime to deliver user experiences that feel right on the device it’s being run on.
You can choose to tailor your app to light up additional device-specific capabilities using adaptive code patterns. You can reference an Extension SDK that supplies device specific APIs and write code that checks for the presence of the API when running on any device before code execution.
In the example above, we have added a reference to a Mobile extension SDK. Wrapping the access to such an API in an if block allows for the code execution to be bypassed when the app is running on any Windows 10 device that does not support the API.
Testing your Universal Windows apps on a PC and phone
You can deploy a Universal Windows app to any device running Windows 10. You can pick which device to test your app on from the emulator dropdown.
Targeting versions of Universal Windows
Going forward we will be adding new capabilities to the Windows 10 developer tools. You can set which the minimum version of the platform you can install your app on. You can also specify which version you build against on your machine using target version.
All of the capabilities that we have introduced in previous previews of Visual Studio 2015 are also available for Universal Windows apps including the new diagnostic tools, XAML UI debugging and all of the profiling tools. Together, these tools make debugging and diagnosing your Windows apps easier than ever.
.NET for Windows 10 Apps
Universal Windows applications written in C# or VB are now optimized using .NET Native. Apps built with .NET Native tools enjoy up to a 60% improvement in startup time, depending on the app, and up to 20% improvements in overall memory consumption over Windows 8.1 .NET applications. In this RC, “Release” builds of your Windows 10 .NET application will be compiled and optimized with .NET Native.
.NET apps in Windows 10 now use the optimized, converged, and open-source .NET Core. This framework unifies .NET libraries across client and server scenarios. “Debug” builds of your Windows 10 applications will run on the open-source CoreCLR using the .NET Core libraries. Running on CoreCLR allows for rapid F5 cycle times during development, and .NET Native provides performance improvements once you’re ready to ship.
Consuming Extension SDKs and 3rd party libraries
To do more with your Universal Windows application, you can also reference additional Extension SDKs and other 3rd party libraries. These SDKs can also be released separately for the Universal Windows platform – for instance as more device families are released. The Nuget manager in Visual Studio 2015 also provides access to a wide range of 3rd party libraries, for example support for Json.
Windows Desktop applications
All of your Windows Desktop applications (WPF, Windows Forms, and Win32) continue to work on Windows 10 without any changes. The Universal Windows platform bridge for classic windows apps will enable developers to call UWP APIs from win32 code. Windows 10 also comes pre-installed with .NET Framework 4.6 which includes many new features including improvements in WPF and Windows Forms.
Application Insights integration
Gaining deep insights into the usage patterns of your application is key to its success in the market place. This release of Visual Studio integrates Application Insights with Windows 10 applications by default so that you can get telemetry for your applications easily via the Microsoft Azure portal. Application Insights offers deep visualizations into the usage patterns of your applications. Read more about getting started with Application Insights in your Windows applications here.
Updated June 28, 2018 8:18 am