{"id":46671,"date":"2020-03-16T12:52:54","date_gmt":"2020-03-16T19:52:54","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/xamarin\/?p=46671"},"modified":"2020-03-16T12:52:54","modified_gmt":"2020-03-16T19:52:54","slug":"whats-new-for-xamarin-developers-in-visual-studio-2019-version-16-5","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/whats-new-for-xamarin-developers-in-visual-studio-2019-version-16-5\/","title":{"rendered":"What&#8217;s New for Xamarin Developers in Visual Studio 2019 version 16.5"},"content":{"rendered":"<p>This week, Visual Studio 2019 version 16.5 was released, bringing new features and improvements for mobile developers in Visual Studio to help you build better mobile apps, faster. <\/p>\n<p>In this release, you will find: <\/p>\n<ul>\n<li><b>Xamarin Hot Restart<\/b>: Test changes made to your app, including multi-file code edits, resources, and references while using a much faster build and deploy cycle. With Hot Restart, debug your iOS app built with Xamarin.Forms on a device connected to your Windows machine allowing for a much faster inner development loop.<\/li>\n<li><b>Android Apply Changes<\/b>: Quickly see changes made to your Android resource files, such as layouts, drawables, etc., on an Android device or emulator without requiring the application to be restarted.<\/li>\n<li><b>Multi-Target Reload for XAML Hot Reload<\/b>: 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.<\/li>\n<li><b>Faster Android Startup<\/b>: Generate your own custom profiles using startup tracing in your Android application providing improved application start-up with a minimal increase in app size.<\/li>\n<li><b>XAML Document Outline<\/b>: See the hierarchy of your Xamarin.Forms UI in the Document Outline pane.<\/li>\n<li><b>XAML Previewer Opt-Out<\/b>: Prefer runtime tooling over visual tooling when building Xamarin.Forms apps? Disable the XAML Previewer in the Xamarin settings in Tools > Options.<\/li>\n<\/ul>\n<div class=\"row justify-content-center\"><a class=\"cta_button_link\" style=\"text-transform: titlecase; display: inline-block; background-color: #0078d4; color: white; padding: 10px; margin: 10px 0; text-decoration: none;\" href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\" target=\"_blank\" rel=\"noopener noreferrer\">Download Visual Studio 2019 version 16.5<\/a><\/div>\n<h3>Faster Iteration with Xamarin Hot Restart<\/h3>\n<p>Xamarin Hot Restart works by pushing new changes to the existing app bundle when possible, vastly reducing the deployment time. It also supports changes to code files, resources, and references. Whether you are editing your view models or swapping image resources, Hot Restart lets you quickly push the changes to a device or emulator. <\/p>\n<p>No project configuration required, so Hot Restart fits in easily and enhances your existing workflow. Additionally, when debugging your app, you can edit your C# code and press the restart button to apply the changes. Your app is automatically restarted so you can now test the new changes.<\/p>\n<p><center>\n<iframe width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/Na9mrY8dx0g?controls=0\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center><\/p>\n<p>With Hot Restart you can debug your iOS app built with Xamarin.Forms on a device connected to your Windows machine. Allowing for a much faster inner development loop. Seeing this affect with the <a href=\"https:\/\/github.com\/Microsoft\/SmartHotel360\" target=\"_blank\" rel=\"noopener noreferrer\">SmartHotel360<\/a> application. Their first builds are <strong>69% faster<\/strong>, while incremental builds are <strong>81% faster<\/strong>:<\/p>\n<table style=\"height: 81px; width: 100%; border-collapse: collapse;\">\n<tbody>\n<tr style=\"height: 27px;\">\n<th style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\"><\/th>\n<th style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">Initial Build<\/th>\n<th style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">Initial Deploy<\/th>\n<th style=\"width: 17%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">Incremental Build<\/th>\n<th style=\"width: 19%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">Incremental Deploy<\/th>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">Hot Restart<\/td>\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">22.8s<\/td>\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">39.5s<\/td>\n<td style=\"width: 17%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">2.5s<\/td>\n<td style=\"width: 19%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">7.3s<\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">w\/o Hot Restart<\/td>\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">172.7s<\/td>\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">26.2s<\/td>\n<td style=\"width: 17%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">37.2s<\/td>\n<td style=\"width: 19%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">14.4s<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Thanks to the thousands of Xamarin developers who gave us feedback during the private preview phase! Xamarin Hot Restart is now available in Visual Studio 2019 version 16.5. See our <a href=\"https:\/\/aka.ms\/hotrestart-doc\" target=\"_blank\" rel=\"noopener noreferrer\">Hot Restart documentation<\/a> for information on how to get started.<\/p>\n<h3>Android Apply Changes<\/h3>\n<p>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. <\/p>\n<p>In this release, we are introducing support for Android Apply Changes enabling you to make resource changes at runtime without having to restart your application. <\/p>\n<p><center>\n<iframe width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/Pvu2SwOTpBU?controls=0\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/center><\/p>\n<h3>Multi-Target Reload for XAML Hot Reload<\/h3>\n<p>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! <\/p>\n<p>When you\u2019re writing your Xamarin.Forms UIs, you want to make sure it looks good on all your target platforms. Instead of debugging on one platform at a time to tweak your UI, why not work on many of them &#8211; like your Android emulator and iOS simulator &#8211; at once? XAML Hot Reload now works out-of-the-box with the multiple startup projects feature in Visual Studio: <\/p>\n<p><center>\n<iframe width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/vMsrRbLk12E?controls=0\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/center><\/p>\n<h3>Android Start-Up Performance<\/h3>\n<p>In a previous release, we had released a feature known as <a href=\"https:\/\/devblogs.microsoft.com\/xamarin\/faster-startup-times-with-startup-tracing-on-android\/\" target=\"_blank\" rel=\"noopener noreferrer\">startup tracing<\/a>. In which you use a default profile to improve the startup performance of your Android applications with a minimal increase to APK size.<\/p>\n<p>This release, we are including MSBuild support for supporting custom profiles within startup tracing. So you can record your own custom profile based on your application\u2019s 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: <\/p>\n<table style=\"height: 81px; width: 100%; border-collapse: collapse;\">\n<tbody>\n<tr style=\"height: 27px;\">\n<th style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\"><\/th>\n<th style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">Release<\/th>\n<th style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">+ AOT<\/th>\n<th style=\"width: 17%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">+ Start-Up Tracing<\/th>\n<th style=\"width: 19%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">+ Custom Start-Up Tracing<\/th>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">Activity Displayed<\/td>\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">4863ms<\/td>\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">2086ms<\/td>\n<td style=\"width: 17%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">3655ms<\/td>\n<td style=\"width: 19%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">1900ms<\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">APK Size<\/td>\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">48MB<\/td>\n<td style=\"width: 16.6667%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">95MB<\/td>\n<td style=\"width: 17%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">57MB<\/td>\n<td style=\"width: 19%; height: 27px; border: 1px solid #dddddd; padding: 8px;\">60MB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Get started with custom startup tracing by following the <a href=\"https:\/\/github.com\/xamarin\/xamarin-android\/blob\/master\/Documentation\/guides\/profiling.md#profiling-the-aot-compiler\" target=\"_blank\" rel=\"noopener noreferrer\">start-up tracing documentation<\/a>.<\/p>\n<h3>XAML Document Outline<\/h3>\n<p>Xamarin.Forms developers already have access to a plethora of tooling to help build UIs faster. UIs such as <a href=\"http:\/\/aka.ms\/xamlhotreloaddocs\" target=\"_blank\" rel=\"noopener noreferrer\">XAML Hot Reload<\/a>, 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.<\/p>\n<p>The Visual Studio 2019 version 16.5 release brings the Visual Studio Document Outline feature to XAML eabling you to see a hierarchy of your Xamarin.Forms UI in the Document Outline pane:\n<center><img decoding=\"async\" class=\"aligncenter size-medium wp-image-46228\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2020\/01\/Blog-DocumentOutline-300x219.png\" alt=\"The XAML Document Outline available in Visual Studio 2019 version 16.5.\" width=\"600\" height=\"438\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2020\/01\/Blog-DocumentOutline-300x219.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2020\/01\/Blog-DocumentOutline-768x561.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2020\/01\/Blog-DocumentOutline.png 986w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/center>\nOpen the document outline with <b>Ctrl+Alt+T<\/b> or via <b>View<\/b> &gt; <b>Other Windows<\/b> &gt; <b>Document Outline<\/b>.<\/p>\n<h3>XAML Previewer for Xamarin.Forms<\/h3>\n<p>We\u2019ve heard feedback that sometimes, you want 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 \u201cDefault XAML Editor\u201d in <strong>Tools<\/strong> > <strong>Options <\/strong>> <strong>Xamarin <\/strong>> <strong>Xamarin.Forms XAML Previewer<\/strong>. <\/p>\n<h3>Even more from Visual Studio 2019 version 16.5!<\/h3>\n<p>That\u2019s just a small peek at what\u2019s available in Visual Studio 2019 version 16.5. It also includes smaller additions, such as bug and performance fixes, as well as updates to the project templates to feature CollectionView, and improved editing for Android XML constructs. For a complete overview of all that is available, check out the <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/releases\/2019\/release-notes\" rel=\"noopener noreferrer\" target=\"_blank\">release notes<\/a>. <\/p>\n<p>Try everything mentioned above today! Download the Visual Studio preview, which can be installed side-by-side with your stable Visual Studio environment: <\/p>\n<div class=\"row justify-content-center\"><a class=\"cta_button_link\" style=\"text-transform: titlecase; display: inline-block; background-color: #0078d4; color: white; padding: 10px; margin: 10px 0; text-decoration: none;\" href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\" target=\"_blank\" rel=\"noopener noreferrer\">Download Visual Studio 2019 version 16.5<\/a><\/div>\n<p>We are directly driven by your feedback, which means Visual Studio 2019 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 <a href=\"https:\/\/developercommunity.visualstudio.com\/spaces\/8\/index.html\" rel=\"noopener noreferrer\" target=\"_blank\">Developer Community<\/a>. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2019 version 16.5 is available today and packed full of awesome new features for Xamarin developers including Hot Restart, Apply Changes, Multi-target XAML Hot Reload, faster Android startup, and tons more!<\/p>\n","protected":false},"author":546,"featured_media":39167,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6602,1,291],"tags":[8232,8233,397],"class_list":["post-46671","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","category-xamarin","category-xamarin-platform","tag-release","tag-roadmap","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>Visual Studio 2019 version 16.5 is available today and packed full of awesome new features for Xamarin developers including Hot Restart, Apply Changes, Multi-target XAML Hot Reload, faster Android startup, and tons more!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/46671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/546"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=46671"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/46671\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/39167"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=46671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=46671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=46671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}