Visual Studio 2019 v16.9 Preview 2 and New Year Wishes Coming to You!

Jacqueline

As we quickly move towards the end of this unpredictable year, our team is delivering at least one more set of features your way in Visual Studio 2019 v16.9 Preview 2! Our C++, .NET, and Xamarin Forms teams have been hard at work to deliver some great new functionality. If you are using Visual Studio 2019 and a new idea comes to mind, feel free to offer suggestions on our Developer Community. Many of our best improvements have come from your suggestions.

Here in Redmond, the temperatures are certainly cooling.  If the same is true for you, grab a cup of your favorite warm beverage and settle in to read about what’s new in this release.  We cannot wait to hear your thoughts.

From Our Teams to You

C++ in Visual Studio 2019 v16.9 Preview 2

Our first announcement comes as we continue to work improvements into ASan on Windows. In Preview 2, the focus is on greater usability. Microsoft Visual Studio C++ (MSVC) can decide the correct address sanitizer runtimes needed for your binaries. This means you do not have to go through extra work by supplying them yourself. Your Visual Studio project will automatically have the latest changes applied. In addition, when using address sanitizer on the command line, you now only need to pass /fsanitize=address to the compiler.

Next in the line of improvements, Visual Studio can now configure IntelliSense in CMake projects based on the value of CMake variables set by toolchain files. This greatly improves IntelliSense for Android and embedded scenarios. The CMakeSetttings.json file is where you can specify your custom IntelliSense options.

We updated the versions of the Clang and LLVM binaries shipped with our installer to v11. We have updated the LLVM and Clang release notes if you would like to read about these changes in greater detail. One enhancement of particular interest is expanded support for representing broken code in the Abstract Syntax Tree (AST). This allows much better error reporting.

In Visual Studio’s Connection Manager comes added functionality by supporting private keys. Previously, we only supported username and password authentication. You can now use other security measures such as private keys using the Elliptic Curve Digital Signature Algorithm (ECDsa) public key algorithm.

New Private Key Usage in Visual Studio 2019 v16.9 Preview 2
New Private Key Usage in Visual Studio 2019 v16.9 Preview 2

 

.NET Productivity in Visual Studio 2019 v16.9 Preview 2

Wrapping up an extremely productive year, our .NET team has offered some additional functionality for you to try.  First of all, when you copy and paste types to a new file, Visual Studio 2019 will now automatically add the using directives to the file to save time. To give this option a try, turn it on under the Tools > Options > Text Editor > C# or Basic > Advanced menus.  Next, select Add missing using directives on paste.

Adding Missing Using Directives in Visual Studio 2019 v16.9 Preview 2
Adding Missing Using Directives in Visual Studio 2019 v16.9 Preview 2

 

Next, Visual Studio 2019’s IntelliSense automatically insert a semicolon as a commit character for object creation and method completion. Check it out in the image below, or better yet let us know how it works for you!

IntelliSense Completion in Visual Studio 2019 v16.9 Preview 2
IntelliSense Completion in Visual Studio 2019 v16.9 Preview 2

 

If you are fond of customizing colors, this next feature will give you something extra to explore. We now offer you semantic colorization for C# 9.0 records. To alter your experience with these customized colors, find the option under Tools > Options > Environment > Fonts and Colors. In Display items scroll to User Types – Records.  From here, you can select the color that you would like to apply.

Semantic Coloring in Visual Studio 2019 v16.9 Preview 2
Semantic Coloring in Visual Studio 2019 v16.9 Preview 2

 

Next, we realize that in C#9, discards are unnecessary in particular pattern matching cases. Accordingly, you can now fade unnecessary discards with our code fix to remove them. In short, place your cursor on the faded discard. Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. Select Remove unnecessary discard. As shown below, this should give you a quick way to clean up your code.

Removing Unnecessary Discards in Visual Studio 2019 v16.9 Preview 2
Removing Unnecessary Discards in Visual Studio 2019 v16.9 Preview 2

 

XAML Tools (WPF, WinUI, UWP & Xamarin.Forms) in Visual Studio 2019 v16.9 Preview 2

Binding Property Generation in View-Models

One last addition to this release is a new lightbulb to help you quickly create a property in the view-model from a binding in the XAML. Check out the brief demonstration below, and feel free to tell us how it works when you try it.

Create a Property in the View-Model from a Binding in Visual Studio 2019 v16.9 Preview 2
Create a Property in the View-Model from a Binding in Visual Studio 2019 v16.9 Preview 2

 

Best Wishes and Happy New Year!

As 2020 and the number of features we plan to release in Visual Studio 2019 winds down, many of us on the team are preparing for some time of reflection and hope of a bright 2021. If this season is one of festivity in your corner of the world, we wish you safe and healthy holidays along with a joyous new year. Particularly, we look forward to the promise of continued innovation in our product and carries the deepest hope of delighting you in your development journey.

In the meantime, if you have any suggestions or feedback about this release, please feel free to weigh in on Developer Community. We are always encouraged by your passionate engagement with Visual Studio 2019 and the direction it takes in the future.

12 comments

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

  • Hakan

    Thank you for the nice post, what is the expected release date of the VS 16.9?

  • Emmanuel Adebiyi

    Lots of good stuff here. Great job from the team. Thanks.

  • Rand Random

    Why does `Binding Property Generation in View-Models` generate the method `SetProperty` and not just simply generate a automatic property?
    Can this behaviour be configured to generate a simple automatic property?
    Can this method be alterated to work with different MVVM libaries, that have an alternative to your `SetProperty` method? eg. a `SetProperty` alternativ already declared in a `ViewModelBase` class?

    • Peter DC

      Ok got it. It allows you to use semicolon as commit character it doesn’t insert semicolon.

  • Jeremiah Johnson

    I do not understand why so much effort is spent making things that are already very easy, easier, like typing a semicolon.

    Missing semicolons is not the kind of problem that plagues developers. (If you want to make semicolons a non-problem, just remove the requirement that they be there.) Semicolon insertion is not the kind of thing that anyone would even ask for, while other much larger bugs and performance problems exist in Visual Studio.

    • Martin Sedlmair

      I agree. Performance and stability is much more an issue in the current version, other then implementing new features that cause even more problems. I can write a very large list that plaques our developers, and it’s not writing a semicolon.

      Also to be honest our project cannot be used with the current preview of VS.

    • Ian Yates

      You misunderstand the semicolon insertion feature. It’s not adding the semicolons for you, it means you can press semicolon to close intellisense and have the semicolon typed.
      Other editors and plugins do this (eg Resharper) – it’s nice to have it actually in VS.

      • Martin Sedlmair

        Of course this is cool, but if the IntelliSense popup takes 4 seconds to show up or even crashes I honestly don’t care about the “feature” 😉

      • Gary Lewis

        I agree that this is a great addition to VS. But, I also have noticed that as IntelliSense and IntelliCode have advanced, VS *performance* has suffered. Perhaps a cycle of performance-only updates is in order. New features are hardly useful if performance suffers as a result of adding them.