Visual Studio 2019 version 16.6 Preview 2 Brings New Features Your Way

Jacqueline Widdis

Visual Studio 2019 version 16.6 Preview 2 comes with several new, exciting capabilities for you to try today.  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.  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.  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.

Version Control

First of all, we are revamping our Git functionality 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.

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.

If you would like to give this a try, toggle on the Preview Feature for New Git user experience in Tools > Options.

Git Integration Demo
Git Functionality Demo in Visual Studio 2019 version 16.6 Preview 2

Improved Snapshot Debugging Experiences

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.

New .NET Async Tool

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.

New Multi-target JavaScript/TypeScript debugging and Service Worker Support

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.

.NET Productivity

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 Ctrl+. to trigger the Quick Actions and Refactorings menu. The option to Add explicit cast beomes available at that point.

 

Add explicit cast in .NET
Add explicit cast in .NET

 

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. If you’d like to give this a try, you can add the file_header_template rule to your EditorConfig file. Next, set the value to equal the header text you would like applied.

 

Visual Studio 2019 version 16.6 Preview 2 Automatically Generate File Headers to Existing Files
Visual Studio 2019 version 16.6 Preview 2 Automatically Generate File Headers to Existing Files

 

Once your cursor is on the first line of any C# or Visual Basic file, you can use Ctrl+. to trigger the Quick Actions and Refactorings menu where the option to Add file banner becomes available. From here you can apply the file header of an existing project or solution by clicking Fix all occurences in. We think this adds some great functionality.  Do you?

 

Visual Studio 2019 version 16.6 Preview 2 Add File Banner
Visual Studio 2019 version 16.6 Preview 2 Add File Banner

 

Also in .NET, you can simplify conditional expressions by removing unnecessary code using the new Simplify conditional expression refactoring capability. Once again, Ctrl+. is the pathway to finding the menu option for Simplify conditional expression.  Be sure to give this a try!

 

Visual Studio 2019 version 16.6 Preview 2 Simplify Conditional Expressions
Visual Studio 2019 version 16.6 Preview 2 Simplify Conditional Expressions

 

Additionally, from the same menu, a new option, Convert verbatim string allows you to convert regular string literals to verbatim string literals. The converse is also true where you can Convert to regular string from verbatim strings.

 

16.6 Preview 2 .NET Convert to verbatim string
Visual Studio version 16.6 Preview 2 .NET Convert to verbatim string

 

Visual Studio 2019 version 16.6 Preview 2 convert to regular string
Visual Studio 2019 version 16.6 Preview 2 convert to regular string

 

ML.NET Model Builder

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

Enabling ML.NET in Visual Studio version 16.6 Preview 2
Enabling ML.NET in Visual Studio version 16.6 Preview 2

 

Once it’s enabled, you can open Model Builder by right-clicking on your .NET project in Solution Explorer and selecting Add > Machine Learning:

Using ML.NET in Visual Studio 2019 version 16.6 Preview 2
Using ML.NET in Visual Studio 2019 version 16.6 Preview 2

 

What makes ML.NET Model Builder 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.

ML.NET Model Builder in Visual Studio 2019 version 16.6 Preview 2
ML.NET Model Builder in Visual Studio 2019 version 16.6 Preview 2

 

Web Tools
New experience for configuring Azure services and emulators

The Connected Services tab now offers a new experience for connecting your application to Azure services such as Azure SQL, Storage, Key Vault and many others. It helps you provision new instances or select existing ones. Also, it ensures your code has the most update 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. 

Connected Services - Service Dependencies - Other Services
Visual Studio 2019 Preview 2 Web Tools Configuring Azure Services and Emulators

 

Updates to the Publish Experience

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 for configuring dependencies to Azure services as detailed above.

 

WebTools Demo Dev16 6 P2
Configuring Azure Services Emulators in Visual Studio 2019 version 16.6 Preview 2

Additions to C++

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.

We have also improved Doxygen & XML comment generation support by adding the /** trigger sequence and enhancing member list tooltips.

Visual Studio 2019 version 16.6 Preview 2 C++ XML Document Commenter
Visual Studio 2019 version 16.6 Preview 2 C++ XML Document Commenter

 

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++.

Visual Studio 2019 version 16.6 Preview 2 IntelliSense Linter
Visual Studio 2019 version 16.6 Preview 2 IntelliSense Linter

 

The C++ team has put together blog posts on the Linter and XML commenter if you would like to know more.

In Summary

We have been working hard to keep bringing enhancements to the product. Also, we continue to address any issues brought up in Developer Community, 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. Meanwhile, we hope you and your loved ones stay healthy and safe.

19 comments

Discussion is closed. Login to edit/delete existing comments.

  • Denis Nikitin 0

    I just installed it, and there’s no git top menu. Is there some magic I need to perform for it to appear?

    • Denis Nikitin 0

      Ah, nm, turns out there’s an option in preview features.

    • Pratik NadagoudaMicrosoft employee 0

      Hi Denis! Yes, that’s correct. For everyone searching for it – you can toggle the new git features on or off through the ‘preview features’ pane in the Tools – Options menu. The easiest way to get to it is Ctrl+Q search for ‘new git user experience’ and you can turn the features on.

  • Paul Cohen 0

    Where is the format for n Editor.Config entry that spans more than 1 line to support “Add file banner”?

    • Thomas Bolon 0

      The example shows how to: you just need to add \n in your banner.

  • dexi lin 0

    Good

  • Christian Häfner 0

    Is 16.6 the next servicing baseline release? If not, what is the next planned version for the next serviceing baseline release (successor of 16.4)?

  • Gweltaz . 0

    Simplify conditional expression : Thanks a lot for that.

    • Mika DumontMicrosoft employee 0

      No problem, I am happy you like it!

  • Taylor, Perry 0

    Has anyone else had the problem where code changes weren’t compiled when you hit F5? i.e. the debugger just used the last compiled version and doesn’t recognize debug points because the code and the pdb no longer match up. I tried using it for an hour right after it came out but got bit by this a couple of times and went back to the release version and life got better. Not sure if I did something wrong or if installing Resharper on top of the beta cause something to go haywire.

  • Jesper Rosholm Tørresø 0

    I have upgraded VS2019 16.6 preview 1 to preview 2. Now when opening a windows form in the windows form designer, this error shows up “Object reference not set to an instance object” leaving the designer wiht blank window. Repair of installation has no effect. A colleague to me has the same problem. Using Preview 1 has worked fine so far.

  • SuperCocoLoco . 0

    Nothing about the old New Project dialog and the old Start Page.

    • Mahmoud SalehMicrosoft employee 0

      Thank you for reporting this issue and for your question. The fix to that issue is now part of 16.6 preview 2. Can you please give it a try? One workaround for 16.5, is to disable the warning. Please see: https://docs.microsoft.com/en-us/cpp/preprocessor/warning?view=vs-2019
      Also, I’ve added additional details in the original thread.

  • Dean Jackson 0

    You should set aside a certain amount of days/months where you do a “new features freeze”, and focus solely on bug fixing. “Zoom” software CEO announced a 90 day freeze and commitment to focus on security/privacy issues. That’s different from VStudio, but still the same concept.

    Get the bugs under control, and then put some measures in place that curb the constant introducing of new bugs with new updates. Finally, if you’ll just be honest/up-front/transparent with us (like talking about the problems and what you’re doing), you’ll find even though it feels embarrassing on your side, that the community will embrace and support you.

  • Michael Kochetkov 0

    Hello. My current VS 16.5.3 shows me a yellow notification “Generate and use Doxygen and XML documentation in the latest Visual Studio Preview. Install More Info”. The “More Info” link leads to this very page. All auto update facilities on my machine are turned off for both the Windows and the Visual studio. I do not want even a slightest risk of changing something on this machine. Is there a way to strictly forbid any kind of such unwanted promotions? Thank you.

  • Christian Häfner 0

    Asking once again, due to no comment to my previous question:
    Is 16.6 the next servicing baseline release? If not, what is the next planned version for the next serviceing baseline release (successor of 16.4)?

    • Jacqueline WiddisMicrosoft employee 0

      Thank you for your patience. 16.6 is not the next servicing baseline, but we are in discussion on which future release will be serviced long term. We will make the announcement when Preview 1 ships as to the baseline status.

  • Edward Gallagher 0

    When will there be a Microsoft.Online.SharePoint.Client.Tenant.dll for .Net Core framework?

Feedback usabilla icon