March 16th, 2020

Visual Studio 2019 version 16.5 is now available

Jacqueline Widdis
Product Manager

The Visual Studio 2019 team here in Redmond has been living under a perpetually grey, wet winter sky since our last minor release. Thankfully, we are beginning to see the sun making regular appearances.  It is our hope this newest release will also brighten your day. Visual Studio 2019 version 16.5 contains anticipated new features from XAML, .NET, C++ and Debugging.  In addition, we have addressed several issues found in our Preview releases. We believe this combination is ready to make your developer journey more productive. If you have any additional ideas to contribute to our product, we invite you to participate in our Developer Community forum.

While I elaborate, why not download our latest version to try for yourself? Also keep in mind, a more complete list of all changes are available in the Visual Studio 2019 release notes.

.NET Mobile Development

Our first feature to discuss is XAML Hot Reload for Xamarin.Forms. This feature speeds up your development and makes it easier to build, experiment, and iterate over your mobile app’s user interface. How? You do not need to rebuild your app each time you tweak your UI as changes instantly show while the app is running! Because this updates as you make changes, if you have interacted with the application, the state of the application is not lost as you make the changes.  Consequently, you do not have to recreate the repo as you previously did. That’s pretty exciting, isn’t it?

We heard lots of feedback on a specific need shared via Developer Community Suggestions.  Due to the fact, you wanted to see changes made to your XAML reload instantaneously on multiple targets such as an iOS simulator and Android emulator, so we have added that capability.

 .NET Productivity

To help with .NET Productivity several features ship in this Visual Studio 2019 version 16.5 release.

First of all, you can convert if statements to switch statements or switch expressions. To do this, place your cursor on the if keyword. Press Ctrl+. to trigger the Quick Actions and Refactorings menu. Finally, select Convert to ‘switch’ statement or Convert to ‘switch’ expression.

Image convert if to switch statement
Convert if to switch statement in Visual Studio 2019.

IntelliSense

Furthermore, IntelliSense now supports completion for unimported extension methods. To access this ability, you will need to enable this option in Tools > Options > Text Editor > C# > Intellisense > and select Show items from unimported namespaces(experimental).

Simplify Interpolation

Additionally, we added the ability to simplify string interpolation refactoring. This will help make your string interpolation more legible and concise. Place your cursor on the string interpolation. Press Ctrl+. to trigger the Quick Actions and Refactorings menu and select Simplify interpolation. 

Simplify interpolation
You can Simplify Interpolation through the Quick Actions and Refactorings menu.

 

The Extract local function refactoring allows you to turn a fragment of code from an existing method into a local function. Highlight the code you want extracted. Press Ctrl+. to trigger the Quick Actions and Refactorings menu and select Extract local function. 

Extract local function
You can Extract Local Function through the Quick Actions and Refactorings menu

The make members static code fix helps improve readability by making a non-static member static. Place your cursor on the member name. Press Ctrl+. to trigger the Quick Actions and Refactorings menu and select Make static. 

Make a member staticv
You can make a member static through the Quick Actions and Refactorings menu.

Testing

Profiling is an excellent tool for identifying performance issues in your code. You can now profile a .NET Core test. To do so your .NET Core projects must be configured to generate full PDB’s. We also recommend upgrading to a minimum version of 16.4 for the Microsoft.Test.SDK. This will enable you to profile tests in both x86 and x64 architecture settings. To profile a test, select Profile from the context menu in the Test Explorer. Test profiling is supported through static instrumentation and Performance Explorer (.vsp) document in Visual Studio.

Debugging in C++ and .NET

Pinnable Properties has been a popular tool for managed code debugging. Specifically, this allows quick visibility of an object’s property without the need of drilling into an object. This feature is now available in C++ for DataTips and the Autos, Locals, and Watch windows.  To use the tool, hover over a property and select the toggle-able pin icon that appears or select the Pin Member as Favorite option in the context menu, bubbling your selected property to the top of your debugger display. 

Pinnable Properties in Debugger
Pinnable Properties tool in Debugger

We’ve also added a new capability to assist you in debugging multithreaded applications.  This helps avoid struggling to determine the source of a deadlock or other thread-related bugs. Subsequently, you can now view which managed thread is holding a .NET object lock in the Call Stack window, Parallel Stacks window and the location column of the Threads window. 

Call Stack Window
.NET Object lock in the Call Stack window, Parallel Stacks window

In a previous update, we made it possible to debug processes running in Docker Linux containers. Now, you can do the same in Docker Windows containers. To give this at try, attach and debug that .NET Framework, .NET Core, and C++ process in the Attach to Process window by selecting the Docker (Windows Container) connection type.   

Docker Window Container
Docker Window Container Process

Finally, for developers building applications on top of the Open Enclave SDK we’ve added debugging support in Visual Studio 2019 version 16.5. So, you can now debug those applications from within the product, for more information, go to aka.ms/OpenEnclaveVisualStudio. 

Image 165GAdockerwindow2

 

 

 

.NET Object Allocation Tool

The .NET Object Allocation tool has been updated with changes aimed to help you visualize your data more easily and reduce the time you spend on memory investigations.  

First, the backtrace view has been moved to a separate panel to enable you to more easily distinguish between the allocation type and the functions within the type being called. Additionally, when an allocation type is selected the call tree is oriented from the leaf to root node to more quickly see what specific function is allocating the most memory and needs to be changed. Lastly, a new average size column has been added both to the allocation type panel and backtrace view. This information is helpful if you are trying to investigate what allocation types or functions are taking up a lot of memory per allocation. Furthermore, all of these columns are sortable and can be toggled on or off so that you can customize the tables to look the way you want. 

Also, take notice of the new icons added to the allocation, call tree, and functions view, so it is easier to visualize the classes and structures being allocated. The two icons represent value types (blue) and reference types (yellow). By the way, a number of other user experiences such as more icons and performance improvements are coming soon to Visual Studio! 

.NET Object Allocation Tool
.NET Object Allocation Tool

 

C++ Improvements in Visual Studio 2019 version 16.5

Visual Studio 2019 version 16.5 brings several improvements to the C++ cross-platform and CMake development experience. Starting with this release, you’re now able to interact with your stored remote connections over the command line. This is useful for tasks such as provisioning new development machines or setting up Visual Studio in continuous integration. 

Interact with stored remove connections through the Developer Command Prompt
Interact with stored remove connections through the Developer Command Prompt

In addition, this release brings the ability to leverage native support for Windows Subsystem for Linux when separating your build system from a remote deploy machine, allowing you to build natively on WSL and to deploy the build artifacts to a second remote machine for debugging. This workflow is supported by both CMake projects and MSBuild-based Linux projects. 

Visual Studio version 16.5 makes it easier than ever to work with CMake projects in Visual Studio. Specifically, this release brings the ability to add, remove, and rename source files and targets in your CMake projects from the IDE without manually editing your CMake scripts. When adding and removing files with the Solution Explorer, Visual Studio will automatically edit your CMake project. Furthermore, you can also add, remove, and rename the project’s targets from the Solution Explorer’s Targets View, as shown below. You can learn more about this and related features at the C++ Team Blog. 

Add, remove, and rename source files in CMake projects
Add, remove, and rename source files in CMake projects

New CMake code navigation features such as Go To Definition and Find All References make it easier to explore and understand complex CMake projects. The navigation feature supports variables, functions, and targets in CMake script files. They work across your entire CMake project to offer more productivity than naïve text search across files and folders. Also, they are integrated with other IDE productivity features such as Peek Definition. 

Download Visual Studio 2019 version 16.5 Today!

As you can see, Visual Studio 2019 version 16.5 gives plenty of new functionality to help you with your development projects. Give it a try today and tell us what you think.

Additionally, if you would like to try out future features, check out our Preview channel to give our next product iteration a try. This Preview release brings additional changes to WFT/UWP Tooling, JavaScript/TypeScript, and Web Tooling. The version 16.6 Preview 1 release notes give full details about each of these features.

As always, we look forward to your feedback!

 

Author

Jacqueline Widdis
Product Manager

Jacqueline joined Microsoft as a Release Manager in April 2019 and has since moved to the Visual Studio Subscriptions team as a Product Manager with projects that span into VisualStudio.com and VS Marketplace. Coming from an educational background in networking and server administration, the move into the developer space has been an exercise in continuous learning. Because of the switch in context, she has taken on the new challenge of documenting the journey in learning the Visual Studio ...

More about author

28 comments

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

  • Timothy Lambert

    Will C++ support ever come to VS for Mac?

  • Robert Johnson

    I see in version 16.5 you're continuing to chip away at everything good. Thanks.
    Searching is horrible - normal search starts moving the cursor as you type - not what any dev wants.
    Now find-in-files has been revamped, and the output no longer displays the regular expression I painstakingly crafted in the find results...
    For example:
    Find all "<TargetFrameworkVers...", Match case, Regular expressions, Entire solution

    Who sanctions these horrible changes? Not developers I assume....

    Read more
  • Alphonse Giambrone

    This is all useless if the product is not usable to start with. I had to uninstall VS2019 and am using 2017 and 2015. Intellisense is so slow that it is simply impossible to do any work. This is a confirmed issue, but won't be fixed! Why? It only happens to some of us? I've reported it and the issue gets closed as a duplicate which points to a nearly 3 year old GitHub project,...

    Read more
  • Nicholas Turner

    Debugging Android and iOS is broken with 16.5.1 by the way.

  • Alberto Gonzalez

    Can you add option in installer to do minimum install for net core 3.1 console developement? without all the old .net, sql server, asp.net, etc or explain how we can do a minimum VS install for net core 3.1 console apps?

    • Nicholas Turner

      Go to Individual Components and select what you need? I always do everything in case you need it later. Drive space is cheap.

  • Dennis Jakobsen

    This broke our solution, more specifically an old Workflow project, did you remove workflow foundation v3 support without mentioning it?

    • Daniel SetserMicrosoft employee

      What problem are you having with your Workflow project? If you're getting an error saying "Sequential and State Machine Workflows are no longer supported by this version of Visual Studio." then support for those Workflows was removed with the release of Visual Studio 2019 (and noted in the release notes at https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-v16.0#office-tools-template-updates).

      If you are having a different error that's new to 16.5 then the change was not intended. If that's the case please report it...

      Read more
  • Александр Петров

    Visual Studio 2019 version 16.5 is SLOW available.
    Download speed 83 kb/s. 1.8 Gb need download. (IP give me 25 Mbit/s).
    Thank’s to MS for broken Visual Studio installation!

    • Art LeonardMicrosoft employee

      Can you please open a new feedback from the installer?
      Is this a new issue for you, or has this always been happening when you update?

      We’re not aware of a general download speed issue with the product, but we are at the mercy of local CDNs depending on where you are in the world.

      We look forward to hearing from you.

  • Paul Stancer

    Do you think it's time to do a bug-bash instead of overloading the product with features that all but a small minority will use, while major features are slow and sometimes unusable. For example, dock a screen when using a wide screen monitor and you can go away and make a coffee while Visual Studio thinks about it. Type a little too fast, and VS2019 takes a while to catch up. And horror of horrors...

    Read more
    • Alphonse Giambrone

      Agree 10,000%. What good is all of this new stuff if one can’t simply type a line of code in a timely manner.

    • kes walker

      +1

      • Mike-E

        +1 to the +1 … especially when all these “new” features have been in ReSharper for over a decade.

    • Dean Jackson

      I agree 100%.

  • Dheeraj Kumar Mekala Dhanraj

    After updating my VS 2019 to 16.5.0. I'm unable to load any solution. Below is the error from activity log. Can anyone please help us.

    878
    2020/03/20 00:43:31.054
    Error
    Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost
    Exception occurred while loading assembly Microsoft.VisualStudio.ConnectedServices.Package2, Version=16.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.ConnectedServices.Package2, Version=16.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The...

    Read more
    • Dheeraj Kumar Mekala Dhanraj

      I was able to fix it after repairing the Visual Studio. It really wasted 3 hours of my time.