{"id":228730,"date":"2020-03-26T11:10:12","date_gmt":"2020-03-26T18:10:12","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=228730"},"modified":"2020-04-01T10:10:10","modified_gmt":"2020-04-01T17:10:10","slug":"visual-studio-2019-version-16-6-preview-2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-2019-version-16-6-preview-2\/","title":{"rendered":"Visual Studio 2019 version 16.6 Preview 2 Brings New Features Your Way"},"content":{"rendered":"

Visual Studio 2019 version 16.6 Preview 2 comes with several new, exciting capabilities for you to try today.\u00a0 We recognize that everyone is facing unprecedented stress and concerns with current world events. The Visual Studio team are all working from home and learning how to navigate the challenges that brings to our day-to-day lives.\u00a0 Alas, even in these uncertain times, the team is extremely excited to bring you this latest update. Visual Studio 2019 version 16.6 Preview 2 comes with several new capabilities for you to try. Also, you have the opportunity to offer feedback in Developer Community<\/a>.\u00a0 As you download and try these new features, we would like to extend our warmest wishes to your health and safety through the upcoming weeks.<\/p>\n

Install Visual Studio 2019 v16.6 Preview 2<\/a><\/div><\/p>\n
Version Control<\/h5>\n

First of all, we are revamping our Git functionality<\/a> to provide an improved experience when working with code on remote Git hosting services. You can begin working on code by browsing online GitHub or Azure repositories through Visual Studio and cloning them locally. For new projects, you can initialize the Git repository and push it to be hosted on GitHub with a single click. Once the code is loaded in Visual Studio, the new Git tool window consolidates all the Git operations having to do with your code.<\/p>\n

Additionally, this feature streamlines the complex navigation for Git that used to live within Team Explorer. The new window minimizes context-switching between tools and applications by focusing on your daily developer workflows with actions like commit, pull, push, stash, and more. From the tool, you can quickly jump to workflows like the new branching experience. Last, there is also a new top-level Git menu to easily find all of your Git commands. This servers as a replacement of the old Teams menu. We continue to work hard to provide a first-class Git and GitHub experience in Visual Studio, and this is just the beginning.<\/p>\n

If you would like to give this a try, toggle on the Preview Feature for\u00a0New Git user experience<\/strong> in\u00a0Tools > Options<\/strong>.<\/p>\n

\"Git
Git Functionality Demo in Visual Studio 2019 version 16.6 Preview 2<\/figcaption><\/figure><\/p>\n
<\/h5>\n
Improved Snapshot Debugging Experiences<\/h5>\n

Based on customer feedback, we wanted to minimize the friction involved in using Snapshot Debugger for the first time. You can now install Snapshot Debugger on Azure App Services (ASP.NET Core 3.1) without requiring a restart. This enables you to debug and diagnose live issues without interruption to your service! Attaching to Snapshot Debugger with Visual Studio Enterprise requires an install of the Snapshot Debugger site extension on your App Service deployment. This process previously required a restart.<\/p>\n

New .NET Async Tool<\/h5>\n

Visual Studio 2019 version 16.6 Preview 2 has a new .NET Async tool as part of the Performance Profiler suite of tools. This adds ease to understanding and optimizing async\/await code in .NET. Basically, you can use this tool to get exact timing information for a variety of tasks including how long they waited to be dispatched to a thread, how long it took to complete, and if the tasks were chained together.<\/p>\n

New Multi-target JavaScript\/TypeScript debugging and Service Worker Support<\/h5>\n

The JavaScript\/TypeScript debugger now supports debugging service workers, web workers, iFrames, and your page JavaScript all at the same time! In addition, the new debugging experience adds support for debugging your back-end node server applications and client-side JavaScript in the browser simultaneously.<\/p>\n

.NET Productivity<\/h5>\n

Almost always providing new updates, the .NET team has added an explicit cast when an expression cannot be implicitly cast. You can access this functionality by placing your cursor on the error and press\u00a0Ctrl+.<\/strong> to trigger the\u00a0Quick Actions and Refactorings\u00a0<\/strong>menu. The option to Add explicit<\/strong> cast beomes available at that point.<\/p>\n

 <\/p>\n

\"Add
Add explicit cast in .NET<\/figcaption><\/figure><\/p>\n

 <\/p>\n

Another feedback implementation coming into the product is the ability to automatically generate file headers to existing files, projects, and solutions by using an EditorConfig<\/a>. If you’d like to give this a try, you can add the\u00a0file_header_template<\/em> rule to your EditorConfig file. Next, set the value to equal the header text you would like applied.<\/p>\n

 <\/p>\n

\"Visual
Visual Studio 2019 version 16.6 Preview 2 Automatically Generate File Headers to Existing Files<\/figcaption><\/figure><\/p>\n

 <\/p>\n

Once your cursor is on the first line of any C# or Visual Basic file, you can use\u00a0Ctrl+.<\/strong> to trigger the\u00a0Quick Actions and Refactorings<\/strong> menu where the option to\u00a0Add file banner<\/strong> becomes available. From here you can apply the file header of an existing project or solution by clicking\u00a0Fix all occurences in.\u00a0<\/strong>We think this adds some great functionality.\u00a0 Do you?<\/p>\n

 <\/p>\n

\"Visual
Visual Studio 2019 version 16.6 Preview 2 Add File Banner<\/figcaption><\/figure><\/p>\n

 <\/p>\n

Also in .NET, you can simplify conditional expressions by removing unnecessary code using the new Simplify conditional expression refactoring capability. Once again,\u00a0Ctrl+. <\/strong>is the pathway to finding the menu option for\u00a0Simplify conditional expression<\/strong>.\u00a0 Be sure to give this a try!<\/p>\n

 <\/p>\n

\"Visual
Visual Studio 2019 version 16.6 Preview 2 Simplify Conditional Expressions<\/figcaption><\/figure><\/p>\n

 <\/p>\n

Additionally, from the same menu, a new option,\u00a0Convert verbatim string<\/strong> allows you to convert regular string literals to verbatim string literals. The converse is also true where you can\u00a0Convert to regular string<\/strong> from verbatim strings.<\/p>\n

 <\/p>\n

\"16.6
Visual Studio version 16.6 Preview 2 .NET Convert to verbatim string<\/figcaption><\/figure><\/p>\n

 <\/p>\n

\"Visual
Visual Studio 2019 version 16.6 Preview 2 convert to regular string<\/figcaption><\/figure><\/p>\n

 <\/p>\n

ML.NET Model Builder<\/h5>\n

ML.NET Model Builder is also included in this release of Visual Studio! You can enable Model Builder in Tools > Options > Environment > Preview Features<\/strong>.<\/p>\n

\"Enabling
Enabling ML.NET in Visual Studio version 16.6 Preview 2<\/figcaption><\/figure><\/p>\n

 <\/p>\n

Once it\u2019s enabled, you can open Model Builder by right-clicking on your .NET project in Solution Explorer and selecting Add > Machine Learning<\/strong>:<\/p>\n

\"Using
Using ML.NET in Visual Studio 2019 version 16.6 Preview 2<\/figcaption><\/figure><\/p>\n

 <\/p>\n

What makes ML.NET Model Builder <\/a>so exciting is you can easily build and consume custom machine learning models for text classification, value prediction, recommendation, and image classification in your .NET applications. All you need to do is select your machine learning scenario and choose your dataset. Model Builder will take care of training models, selecting the best model for your data, and generating the .NET code for consuming the model in your app. You can even scale out to the cloud and take advantage of Azure Machine Learning for image classification models without leaving Visual Studio or .NET.<\/p>\n

\"ML.NET
ML.NET Model Builder in Visual Studio 2019 version 16.6 Preview 2<\/figcaption><\/figure><\/p>\n

 <\/p>\n

Web Tools<\/h5>\n
New experience for configuring Azure services and emulators<\/h5>\n

The Connected Services tab now offers a new experience for connecting your application to Azure services such as Azure SQL, Storage<\/span>, Key Vault and many others. It helps you provision new instances or select existing ones. Also, it ensures your code has the most <\/span>up<\/span>date<\/span> to date NuGet packages and the right startup configuration code. Wherever possible local emulation options are also available. If you decide to use Publish to deploy your application to Azure the same experience is available within the Profile Summary page minus the emulators.<\/span>\u00a0<\/span><\/p>\n

\"Connected
Visual Studio 2019 Preview 2 Web Tools Configuring Azure Services and Emulators<\/figcaption><\/figure><\/p>\n

 <\/p>\n

Updates to the Publish Experience<\/h5>\n

Publishing now offers a new wizard-like experience for creating new publish profiles. This tool guides you through your various options. Even if some Visual Studio components are missing from your installation, you will still have access to the full set of publishing targets and options. Consequently, any of your missing components will be identified and requested to be installed on demand. The publish profile summary page has also been updated to match the new experience available under the Connected Services tab<\/strong> for configuring dependencies to Azure services as detailed above.<\/p>\n

 <\/p>\n

\"WebTools
Configuring Azure Services Emulators in Visual Studio 2019 version 16.6 Preview 2<\/figcaption><\/figure><\/p>\n
<\/h5>\n
Additions to C++<\/h5>\n

We have added Ninja support for CMake for Linux\/WSL. Now, you can use Ninja as the underlying generator when building CMake projects on WSL or a remote system. In addition, Ninja is now the default generator when you are adding a new Linux or WSL configuration. In addition, we have added simplified debugging templates for remote CMake debugging.<\/p>\n

We have also improved Doxygen & XML comment generation support by adding the\u00a0\/**<\/strong> trigger sequence and enhancing member list tooltips.<\/p>\n

\"Visual
Visual Studio 2019 version 16.6 Preview 2 C++ XML Document Commenter<\/figcaption><\/figure><\/p>\n

 <\/p>\n

On the same line of adding helpful support, our IntelliSense code linter now underlines code errors and suggests quick fixes in C++ projects. You can enable this tool under Tools > Options > Environment > Preview Features > IntelliSense code linter for C++<\/strong>.<\/p>\n

\"Visual
Visual Studio 2019 version 16.6 Preview 2 IntelliSense Linter<\/figcaption><\/figure><\/p>\n

 <\/p>\n

The C++ team has put together blog posts on the Linter<\/a> and XML commenter<\/a> if you would like to know more.<\/p>\n

In Summary<\/h5>\n

We have been working hard to keep bringing enhancements to the product. Also, we continue to address any issues brought up in Developer Community<\/a>, so we invite you to participate with any issues or suggestions. Thank you for giving these features a try! If you’d like additional information on what we are working on next, check out the newly updated Visual Studio 2019 product roadmap<\/a>. Meanwhile, we hope you and your loved ones stay healthy and safe.<\/p>\n

Install Visual Studio 2019 v16.6 Preview 2<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"

Visual Studio 2019 version 16.6 Preview 2 releases today with several new features to help developer productivity. Check out our improved Git integration, .NET Productivity features, plus so much more!<\/p>\n","protected":false},"author":4513,"featured_media":228750,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[237,354,9,467,124,125,475],"class_list":["post-228730","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-net","tag-announcement","tag-debug","tag-intellicode","tag-javascript","tag-typescript","tag-visual-studio-2019"],"acf":[],"blog_post_summary":"

Visual Studio 2019 version 16.6 Preview 2 releases today with several new features to help developer productivity. Check out our improved Git integration, .NET Productivity features, plus so much more!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/228730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/4513"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=228730"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/228730\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/228750"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=228730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=228730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=228730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}