What’s New for Xamarin Developers in Visual Studio 2019 for Mac version 8.5
This week, Visual Studio 2019 for Mac version 8.5 was released! Which brings several new features and improvements for mobile developers in Visual Studio for Mac to help you build better mobile apps, faster.
Visual Studio 2019 for Mac version 8.5
In this release, you will find:
- Multi-Target Reload for XAML Hot Reload: Reload changes made to XAML instantly on multiple targets at the same time for rapid UI iteration. Such as an iOS Simulator and Android emulator.
- Android Apply Changes: Quickly see changes made to Android resource files on an Android device or emulator without requiring the application to be restarted. Including changes to layouts, drawables, etc.,
- Faster Android Startup: Generate custom profiles using startup tracing in your Android applications. This provides improved application start-up with minimal increase in app size.
- XAML Document Outline: See the hierarchy of your Xamarin.Forms UI in the “Document Outline” pane.
- Improved Xcode Storyboard Designer Integration: Add the ability to set your default iOS designer in Visual Studio for Mac. Which enables the use of tools that make you most productive for authoring iOS UIs.
- XAML Previewer Opt-Out: Prefer runtime tooling over visual tooling when building Xamarin.Forms apps? Disable the XAML Previewer in the Xamarin settings in Tools > Options.
Multi-Target Reload for XAML Hot Reload
XAML Hot Reload for Xamarin.Forms speeds up your development and makes it easier to build, experiment, and iterate on user interfaces. This means no longer having to rebuild your app each time you tweak your UI. Instead, it instantly reflects those changes in your running app!
You shared a need to see changes made to your XAML reloaded instantaneously on multiple targets – such as an iOS simulator and Android emulator – at the same time. This release adds to the capability to reload XAML on multiple targets at the same time:
To use multi-target reload for XAML Hot Reload, create a run configuration in Visual Studio for Mac for the targets you would like to debug and reload at the same time.
Android Apply Changes
In our effort to examine how we can make Android developers more productive, we looked at the most common edit types. After discussion with developers, like you, we found that Android resources, as well as layouts and drawables, made up a significant portion of edits. In this release, we are introducing support for Android Apply Changes. This enables you to make resource changes at runtime without having to restart your application – even during a debug session.
Android Start-Up Performance
In a previous release, a feature known as startup tracing was included. In which you use a default profile to improve the startup performance of your Android applications with a minimal increase to APK size.
This release includes MSBuild support for custom profiles within startup tracing. Now, you can record your own custom profile based on your application’s needs at startup time. The generated profile can then be used instead of a default profile. Resulting in improved startup performance to an additional 40%, with a minimal increase to your APK size. For example, here is a table below against the Smart Hotel 360 sample application:
|Release||+ AOT||+ Start-Up Tracing||+ Custom Start-Up Tracing|
Get started with custom startup tracing by following the start-up tracing documentation.
XAML Document Outline
Xamarin.Forms developers already have access to a plethora of tooling to help build UIs faster. UIs such as XAML Hot Reload, control toolbox, and property panel. In addition to a powerful editing experience with IntelliSense. Our goal is to provide a delightful mix of design-time (such as toolbox, property panel, editor) and run-time (such as XAML Hot Reload) tooling to make building Xamarin.Forms UIs productive.
The Visual Studio 2019 for Mac version 8.5 release brings the Visual Studio Document Outline feature to XAML, enabling you to see a hierarchy of your Xamarin.Forms UI in the Document Outline pane:
Open the document outline via View > Pads > Document Outline.
Improved Xcode Storyboard Designer Integration
In numerous conversations with developers building iOS apps with Xamarin, we heard that developers building native iOS applications either prefer to author their UIs in C# or utilize the Xcode storyboard designer over the provided designer in Visual Studio for Mac.
Driven by feedback provided by you, we are adding the ability to set your default iOS designer in Visual Studio for Mac. Now enabling you to use the tools that make you most productive. Changes made in the Xcode storyboard designer will be synchronized back to Visual Studio for Mac automatically. Rather than waiting for new features to be implemented in the Xamarin iOS designer, enable your UIs to take full advantage of the latest-and-greatest in iOS immediately!
XAML Previewer for Xamarin.Forms
We heard feedback that you need a lightweight XAML editor experience, especially when coding on-the-go. To help you streamline your development environment, turn off the XAML Previewer by changing your “Default XAML Editor” in Tools > Options > Xamarin > Xamarin.Forms XAML Previewer.
More From Visual Studio 2019 for Mac version 8.5!
That is just a small peek at what is available in Visual Studio 2019 for Mac version 8.5. It also includes smaller additions, such as bug and performance fixes. As well as updates to the project templates to feature CollectionView, in addition to improved editing for Android XML constructs. For a complete overview of all that is available, browse the release notes.
Our roadmap is directly driven by your feedback. Which means Visual Studio 2019 for Mac is full of features that were inspired by YOU! From XAML Hot Reload to faster Android build and deployment times. Make your voice heard by filing bug reports or sharing feature suggestions on Developer Community.