Visual Studio 2019 version 16.5 is now available

Jacqueline Widdis

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!

 

28 comments

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

  • Ed Kennedy 0

    Were there any improvements made to unit testing in addition to profiling? Thanks for the update.

  • Chris Eggert 0

    Searching for “unimported namespaces” in the VS2019 16.5 options dialog does not show the “Show items from unimported namespaces” option even though it is there at the location specified above.

  • Isaac Morton (ACD Systems) 0

    When are the C++20 additions going to start trickling in at a faster pace?

    • Mahmoud SalehMicrosoft employee 0

      Hi Isaac,
      Many new C++20 features have been added to VS 16.5 (under the /std:c++latest compiler). Our C++ library development have recently moved to GitHub. You you can find our iteration plan at https://github.com/microsoft/STL/wiki/Iteration-Plans

    • Steve 0

      In my experiment, I can already use most of C++ 20 features (concepts, coroutine, modules…) in VS 16.5 with compiler flags: /await /std:c++latest. Although there’re still some issues with intellisense and syntax highlight.

    • Ulzii Luvsanbat Microsoft employee 0

      Hi Isaac,

      Thank you for asking about C++20 development. As Mahmoud says some C++20 features in the compiler (MSVC) will be available with Visual Studio 2019 version 16.5. You can expect more C++20 features to be available throughout this year across MSVC compiler, STL library, Static analysis, IntelliSense. We will be very active at “https://devblogs.microsoft.com/cppblog” whenever new features are incrementally available.
      Thanks,
      Ulzii Luvsanbat

  • Eli Black 0

    Showing which thread the current thread is waiting on sounds awesome! ^_^

  • Abolfazl Bahari Salim 0

    The Block Copy / Cut feature in this version has been a problem and can no longer be copied or cut and Paste without blocking the code

    • Hemchander SannidhanamMicrosoft employee 0

      Hi Abolfazl Bahari Salim,
      Thank you for sharing your feedback! It would be great if you can share your feedback using the guidance here: https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2019 This will help us track your feedback and get it routed to the appropriate team to fix. Additionally, it helps other users like you to read about the status of the issue and learn about any workarounds, etc.

      Once again thank you for using Visual Studio!

  • SuperCocoLoco . 0

    Nothing new about del old “New Project” dialog and the old “Start Page”.

  • Dheeraj Kumar Mekala Dhanraj 0

    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 located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'Microsoft.VisualStudio.ConnectedServices.Package2, Version=16.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.<>c__DisplayClass17_0.<LoadAssembly>b__0(AssemblyName assemblyNameParam) .;vs.platform.extensibilityhosting.assemblyloadexception.AssemblyFullName=Microsoft.VisualStudio.ConnectedServices.Package2, Version=16.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;vs.platform.extensibilityhosting.assemblyloadexception.AssemblyPath=file:///C:/PROGRAM%20FILES%20(X86)/MICROSOFT%20VISUAL%20STUDIO/2019/ENTERPRISE/COMMON7/IDE/EXTENSIONS/MICROSOFT/CONNECTEDSERVICES/Microsoft.VisualStudio.ConnectedServices.Package2.dll;vs.platform.extensibilityhosting.assemblyloadexception.FusionLogEntry=;vs.platform.extensibilityhosting.assemblyloadexception.ExceptionType=System.IO.FileLoadException;vs.platform.extensibilityhosting.assemblyloadexception.ExceptionMessage=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 located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040);vs.platform.extensibilityhosting.assemblyloadexception.ExceptionStackTrace= at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.<>c__DisplayClass17_0.<LoadAssembly>b__0(AssemblyName assemblyNameParam)

    • Dheeraj Kumar Mekala Dhanraj 0

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

  • Paul Stancer 0

    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 you try and use the SQL editor, and you’ll be restarting faster than the VS 2019 testing teams says “Cannot replicate. Closing issue”.

    Seriously, take a step back and spend a couple of sprints fixing as many bugs as you can. Your user base will thanks you.

    • Dean Jackson 0

      I agree 100%.

    • kes walker 0

      +1

      • Mike-E 0

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

    • Alphonse Giambrone 0

      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.

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

    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 0

      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.

  • Dennis Jakobsen 0

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

  • Alberto Gonzalez 0

    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 0

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

  • Nicholas Turner 0

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

  • Alphonse Giambrone 0

    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, which has not been fixed.
    https://developercommunity.visualstudio.com/content/problem/615543/intellisense-slow-responding-or-doesnt-respond-at.html.
    Would it really be that difficult to simply fix it? Intellisense works great in VS2015, slightly slower in 2017, but workable. It is simply common sense to look at those, find what’s changed and fix 2019.

  • Robert Johnson 0

    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. Thanks again.

  • Timothy Lambert 0

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

Feedback usabilla icon