Visual Studio 2019 v16.9 and v16.10 Preview 1 are Available Today!

Jacqueline

Whenever there is a conference such as Microsoft Ignite, there is a tangible excitement throughout our internal teams. We look forward to discovering what new, exciting products, product features, and educational opportunities are available for our customers. Carrying this excitement forward, the Visual Studio team is eager to release Visual Studio 2019 v16.9 and v16.10 Preview 1. We hope you enjoy the new features highlighted from some of teams such as C++, .NET Productivity, Address Sanitizer, XAML Tooling, and IntelliCode teams.  In addition, Visual Studio 2019 v16.9 is our next long-term servicing release.

While you enjoy some of our virtual conference sessions, feel free to download one of our latest releases to give these new features a try.  Also, we love to hear your feedback through our improved Developer Community. It is the first place our teams look for new ideas or to address any problems you may be experiencing. We look forward to interacting with you through our vibrant online community.

What’s New in Visual Studio 2019 v16.9?

Address Sanitizer with C++

First up on our announcements is Address Sanitizer support for Windows is out of experimental support and now generally available. The highlight change is MSVC can now work out which runtime libraries are needed to use ASan with your project. Consequently, you no longer need to supply them when compiling from the command-line. All you need to do is set /fsanitize=address and our tools will work out the rest of the details.

Additionally, the IDE integration for ASan-reported exceptions (vcasan.lib) now handles the complete collection of reportable ASan exceptions. If the compiler and linker detect you are building with ASan but not receiving debug information, it will offer the option to emit this information.

Finally, we have added support for global C variables and __declspec(no_sanitize_address). This makes it possible to opt out of running the Address Sanitizer over specific variables or even entire functions.

C++ Conformance

We have implemented the More Constexpr Containers proposals which allows destructors and new expressions to be constexpr. We are excited about this as it paves the way for utilities like constexpr std::vector and std::string. Included in our implementation in this release are compiler diagnostics for uses which trigger undefined behavior.

C++ IntelliSense

Based on your feedback, we have made many improvements to the stability and functionality of providing imported modules and header units in IntelliSense. We appreciate every report, so please keep them coming! While we were working on stability, we also added extra functionality. As a result, we can highlight Go-to-definition on module imports, indexing support for export {…}, and more accurate module reference for those with identical names.

Go-to-definition on Module Imports in Visual Studio 2019 v16.9
Go-to-definition on Module Imports in Visual Studio 2019 v16.9

As implementation of a top-voted Developer Community suggestion ticket, we added completion for make_uniquemake_shared, and emplace_back. These provide text completion based on the specified type parameter.

Additionally, Visual Studio 2019 can configure IntelliSense in CMake projects based on the value of CMake variables set by toolchain files. This greatly improves IntelliSense for Android and other embedded scenarios. The CMakeSettings.json file is the location to specify your custom IntelliSense options.

Improved Call Stack Handling of Stack Overflow Scenarios

Visual Studio 2019 has a new capability to filter out redundant frames from the call stack when the debugger stops on a Stack Overflow Exception. It is now possible to see the base of the stack where an infinite recursion originated. This should make it easier to investigate these types of bugs.

Improved Call Stack Handling in Visual Studio 2019 v16.9
Improved Call Stack Handling in Visual Studio 2019 v16.9

 

New .NET Core Memory Dump Analyzers

Deadlocks generally occur when thread A is waiting for thread B to release a lock. Simultaneously, thread B is waiting for thread A to release a lock. This conundrum caused us to add a new Auto Analyzer to inspect the threads in a memory dump to determine if an unresponsive application is due to one of these deadlocks. A blocked finalizer can lead to abnormal memory growth which. This, in turn, can lead to system instability due to out of memory exceptions. Our new Analyzer inspects the .NET Core Finalizer queue to help you identify potential blocking objects in a memory dump.

New Memory Dump Analyzers in Visual Studio 2019 v16.9
New Memory Dump Analyzers in Visual Studio 2019 v16.9

To access the Analyzer, open your memory dump in Visual Studio 2019. On the Mini Dump File Summary page, select the Run Diagnostics Analysis action.

IntelliCode: Frictionless Suggestions in the Completions List

IntelliCode suggestions already helps you find other locations where a repeated edit applies. Comparatively, in Visual Studio 2019 v16.9, you can easily apply suggestions in a more frictionless way and without breaking your editing flow. You can find IntelliCode suggestions right in your IntelliSense completion list. From there, you are also able to find and apply the same change in other locations. This new functionality in the completion list should blend naturally into your editing flow. The edit is added to the completion list in a non-intrusive way. This makes edits easy to find and perform repetitious actions.

Find out more in the blog post from the team who wrote the feature.

IntelliCode: Frictionless Suggestions in Visual Studio 2019 v16.9
IntelliCode: Frictionless Suggestions in Visual Studio 2019 v16.9

.NET Productivity

From our .NET team, we bring you several features to help with continual improvements in productivity. First on the list, using directives will now automatically be added when copying and pasting types to a new file. To give this a try, you will need to turn on this option under Tools > Options > Text Editor > C#. You can also access it from Basic > Advanced and select Add missing using directives on paste.

Using Directives Automatically Added in Visual Studio 2019 v16.9
Using Directives Automatically Added in Visual Studio 2019 v16.9

We have also added inline type hints that insert adornments for variables with inferred types and lambda parameter types. Like the last feature, you will need to turn this feature on under the menu Tools > Options > Text Editor > C# or again under Basic > Advanced > Display inline type hints. This last option is under the Inline Hints section. Hold down Alt+F1 to view hints at any time.

Inline Type Hints in Visual Studio 2019 v16.9
Inline Type Hints in Visual Studio 2019 v16.9

In addition, there is now IntelliSense completion that automatically inserts a semicolon as a commit character for object creation and method completion.

Automatic Semicolon Insertion in Visual Studio 2019 v16.9
Automatic Semicolon Insertion in Visual Studio 2019 v16.9

.NET Core Debugging with WSL 2

Are you a .NET Core developer who loves working in Windows and Visual Studio, but needs to test your app in Linux? If so, the new .NET Core debugging in WSL 2 feature is something you will want to try out! It enables you to debug your code in WSL 2 using the Linux distro of your choice.

.NET Core Debugging with WSL 2 in Visual Studio 2019 v16.9 Preview 1
.NET Core Debugging with WSL 2 in Visual Studio 2019 v16.9

After installing WSL 2 and the distribution of your choice and opening an ASP.NET Core web app or .NET Core console app in Visual Studio, you’ll see a new Launch Profile named WSL 2.

Adding Launch Profile WSL 2 in Visual Studio 2019 v16.9 Preview 1
Adding Launch Profile WSL 2 in Visual Studio 2019 v16.9

Selecting this profile will add it to your launchSettings.json. Once the new profile is selected, Visual Studio checks that your WSL 2 distribution is configured to run .NET Core apps, and helps you install any missing dependencies. As soon as all the dependencies are installed, you are ready to debug WSL 2. From here, you can start Debugging as normal, and your app will now be running in your default WSL 2 distribution. Check Environment.OSVersion to verify the correct distribution.

Note: Only Ubuntu and Debian have been tested and are currently supported. Other distributions supported by .NET Core should work but require manually installing the .NET Core Runtime and Curl.

By default, the WSL 2 launch profile will use the default distribution as set in wsl.exe, but you can modify your launch profile to include specific distributions. Adding extra functionality, you can also have multiple launch profiles. For instance, if you need to test your console app on Debian, Ubuntu 18.04, and Ubuntu 20.04, you could modify these settings.

XAML Tools (WPF, WinUI, UWP & Xamarin.Forms

In this release we’ve made multiple improvements to our XAML tooling, highlights include: 

For MVVM Tooling improvements in the XAML code editor we’ve introduced lightbulbs to set the design DataContext in XAML to an available view-model. Setting this enhances IntelliSense, such as the ability to create new ViewModel properties, Go To Definition and completions right from the XAML code editorYou can even create new ICommand properties for whichever implementation your solution references. 

Xamarin.Forms “changes only” XAML Hot Reload is now GA quality, no longer in preview. Apps targeting Xamarin.Forms 5.0 or newer will use this new mode by default.  

The new “changes only” XAML Hot Reload mechanism makes it possible to update your running app’s UI in real-time and see those changes reflected immediately without requiring the full page to be reloaded, and without having to save the file. “Changes only” Hot Reload also supports the Live Visual Tree, so you can see the runtime UI hierarchy for your app and easily navigate to your XAML source code.  

Live Visual Tree in Visual Studio 2019 v16.9
Live Visual Tree in Visual Studio 2019 v16.9

For those customers who prefer to continue to use the older “full page” Hot Reload you can still do so even for projects targeting Xamarin.Forms SDK v5 by going to the Hot Reload settings under Tools > Options > Debugging > Hot Reload.

These are just two of our highlights, for a complete list of XAML tooling improvements please see the release notes.

Ding! Your Test Run is Complete!

One of the features we find particularly fun is how Test Explorer can play audio cues after a test run completes. This includes the option for different sounds for test runs with all tests passing and a different for test runs with at least one failing test. You are also able to fully customize these sounds using the Windows 10 sound library or your own audio files. To watch this in action, check out our demo.

Improvements to GitHub Actions Tooling

In a previous post, using GitHub Actions in Visual Studio is as easy as right-click and Publish, we announced the efforts added to Visual Studio 2019 to extend our Publish experiences. Specifically, we sought to introduce and assist developers to repeatable, predictable continuous integration and deployment (CI/CD) environments using GitHub Actions. In this release, we bring the following improvements:

  • A redesigned summary page.
  • An added new status section
  • Commit and push the workflow with just one click

In addition, these updated experiences also now recognize more project types. Plus, we will help you generate CI/CD workflows for building, testing, deploying ASP.NET web projects to Azure App Service, Azure Functions, and Azure API Management.

GitHub Actions Tooling in Visual Studio 2019 v16.9
GitHub Actions Tooling in Visual Studio 2019 v16.9

What’s New in Visual Studio 2019 v16.10 Preview 1?

.NET Productivity

Our .NET Productivity team has been working hard for this release!

Remove Unused References

We have added functionality through the Remove Unused References command. This command allows you to clean up unused project references and NuGet packages. This option is turned off by default, but you can enable it under menu Tools > Options > Text Editor > C# > Advanced. Select the Remove Unused References command in Solution Explorer (Experimental). Once the option is enabled, the Remove Unused References command will appear in the right-click menu of a project name or dependencies node.

Remove Unused References in Visual Studio 2019 v16.10 Preview 1
Remove Unused References in Visual Studio 2019 v16.10 Preview 1

 

When you select Remove Unused References, a dialog box will open. You can then view all references that are going to be removed, but you also have the option to preserve any you wish to keep.

Customize Removal of Unused References in Visual Studio 2019 v16.10 Preview 1
Customize Removal of Unused References in Visual Studio 2019 v16.10 Preview 1

 

Simplify LINQ Expressions

Next, there is a refactoring to Simplify LINQ expressions. This will remove the unnecessary call to the Enumerable for the .Where() method to help improve performance and readability. To access this feature, place your cursor on the LINQ Expression, press (Ctrl+) to trigger the Quick Actions and Refactorings menu. Select Simplify LINQ expression.

Simplify LINQ Expressions in Visual Studio 2019 v16.10 Preview 1
Simplify LINQ Expressions in Visual Studio 2019 v16.10 Preview 1

 

New Completion Options

Next, there is additional IntelliSense functionality by the added completion for Enum values when a type is known even if the Enum value is not entered.

IntelliSense Completion for Enum Values in Visual Studio 2019 v16.10 Preview 1
IntelliSense Completion for Enum Values in Visual Studio 2019 v16.10 Preview 1

We have also added a new IntelliSense completion mode setting that gives you the ability to set default completion options. This new setting is available in Tools > Options > Text Editor > Advanced > Default IntelliSense completion mode where you can choose  from the following options: Last used which will preserve the last setting you used with Ctrl+Alt+Space, Tab-only which will only complete on tab, and Automatic which is currently the default behavior that will complete on punctuation and special characters.

IntelliSense Completion Options in Visual Studio 2019 v16.10 Preview 1
IntelliSense Completion Options in Visual Studio 2019 v16.10 Preview 1

To continue to help you, we added a new command called Smart Break Line that automatically inserts a set of braces and adds the caret within those braces when using Shift+Enter as a commit character. Smart Break Line works for all type declarations that require braces as well as properties, events, fields, and object creation expressions. The example below shows Smart Break Line used on a class and  a field. If the field doesn’t have a semicolon at the end, typing Shift+Enter will convert the field to a property by adding a set of braces. One more use ofShift+Enter will undo the commit which will still automatically add a semicolon at the end of the field.

Smart Break Lines in Visual Studio 2019 v16.10 Preview 1
Smart Break Lines in Visual Studio 2019 v16.10 Preview 1

New Code Style Preferences for New Lines

Finally, we have added new code style preferences for new lines. You can configure these preferences with an EditorConfig file or with Tools > Options > Text Editor > C# > Code Style > New line preferences (experimental).

New Line Style Preferences in Visual Studio 2019 v16.10 Preview 1
New Line Style Preferences in Visual Studio 2019 v16.10 Preview 1

As an example, you can set your code style preferences to report a diagnostic and offer a code fix to remove extra blank lines.

Remove Extra Blank Lines in Visual Studio 2019 v16.10 Preview 1
Remove Extra Blank Lines in Visual Studio 2019 v16.10 Preview 1

 

Extended Support for Visual Studio 2019 v16.9

Visual Studio 2019 version 16.9 is the fourth supported servicing baseline for Visual Studio 2019. Consequently, Enterprise and Professional customers are encouraged to standardize on this version as it will provide a long term stable and secure development environment.  As explained in more detail in our lifecycle and support policy, version 16.9 will be supported with fixes and security updates for one year after the release of the next servicing baseline.

Now that version 16.9 is available, version 16.7, our last released servicing baseline, will be supported for an additional year and will go out of support in April 2022. Prior minor versions 16.0, 16.1, 16.2, 16.3, 16.5, 16.6, and 16.8 are no longer under support.  These intermediary releases received servicing fixes only until the next minor update was released.

You can acquire the latest most secure version of Visual Studio 2019 version 16.9 in the downloads tab of the Subscriptions portal.  For more information about Visual Studio supported baselines, please review the support policy for Visual Studio 2019.

As you can see, we have been busy updating our product to bring more value and productivity to our developers. We hope you enjoy each of these features and look forward to hearing your suggestions for improvements on Developer Community. For now, I am going to settle into a few of our Ignite 2021 sessions where I hope to see you interacting online. As always, we wish you a happy Visual Studio 2019 experience with either our v16.9 or v16.10 Preview 1 release. This calendar year promises some very exciting announcements, so stay tuned!

29 comments

Comments are closed. Login to edit/delete your existing comments

  • Piotr Karczmarz

    When we could expect the next major Visual Studio version after v16 (2019)? When v17(?) will be released and what we could expect from it?

    The public roadmap for v17 will be really useful for the community. Could you write a series of blog posts about the next major VS version?


    Piotr Karczmarz, CTO at ContextKeeper.io, building VS plugin allowing to jump to deep work quicker via “mental snapshots”.

    • Mike Diack

      Agreed. Would be good to know more. I saw some screenshots of an IDE that wasn’t VS 2019 but looked similar… a few months back during a blog post about the idea of moving VS IDE extensions out of process in VS V17 – can we get some more news please?

  • Eugene Ivanoff

    1. In addition, there is now IntelliSense completion that automatically inserts a semicolon as a commit character for object creation and method completion. Doesn’t work.
    2. Alternatively, Alt+F1 will show you hints at any time. Only temporarily.

  • Eugene Ivanoff

    1. In addition, there is now IntelliSense completion that automatically inserts a semicolon as a commit character for object creation and method completion. Doesn’t work.
    2. Alternatively, Alt+F1 will show you hints at any time. Only temporarily. Moreover, you need to hold these keys – hints do not show up immediately.

    P.S. The comment system of blogs leaves much to be desired: 1) I wanted to edit my comment, but added text is gone. 2) I wanted to delete the comment – it’s not deleted.

    • Mika DumontMicrosoft employee

      Hi Eugene, For method call completion did you type a semicolon for the method call to complete? And yes you will need to hold down Alt+F1 to view the hints. I apologize that you are having issues with the blog system. I will relay this message to see if they can look into this.

      • Eugene Ivanoff

        Mika, thanks for response! The automatic colon insertions now works, but the article didn’t mention about it. 🙄 But why there’s a delay before showing hints? 😐

  • Giovanni Lambiase

    Same day 16.9 was released Visual Studio installer started to hang and close some seconds after window opening (Italian localization). I reported a Feature Suggestion, because it can’t be used to report a bug.
    Can you check for it?
    Thanks

  • PoisnFang

    Xamarin “Hot Reload” is only really useful after you have finished you app and are working on some UI design. I hardly find it useful at all as I am in the middle of a session and need to edit one thin in C# and have to restart the whole thing….

  • David Aldrich

    It seems there’s a change in v16.9 that affects remote connections – the behaviour of remoteCMakeListsRoot has changed. Shouldn’t this be mentioned in the Release Notes?

  • Ray Torres

    Many accolades to all of the VS Team. The Add missing using directives on paste, will save me and other a lot of time.

    Is there a possibility that C# could have a global file for all the using’s, instead of having them in each file? This is just a thought.

    Thanks

  • Yohan SCIUBUKGIAN

    This Remove Unused References feature is great !
    Could you please add this option at Solution (.sln) level so it can parse all projects in a single click ?
    it will be way more productive for mid/large solutions

    Even if it takes more time it will be great because we won’t have to wait after each project analysis.