Visual Studio 2019 v16.8 Preview 2 Releases New Features Today!
New features in Git Integration, .NET Productivity, Web Tools, and Xamarin are releasing in Visual Studio 2019 v16.8 Preview 2. Each of our teams continue to work hard to delight our developers. For this reason, Preview releases are some of the most exciting for us as we wait to hear how our newest features impact your work.
From my perspective, one of the greatest aspects of shipping releases is how engaged you are in the improvement of our products. If you have any suggestions or run into any challenges using these features, please visit our Developer Community to let us hear your perspective. If you want greater details of what’s in this release, please see our release notes.
New Features in this Release
Some repositories have more than one solution in them. Now when you open such a repository, the Solution Explorer will display a list of solutions for you to select. By default, folder view is always present at the top. This opens the root folder of the repository. Double clicking on a solution in this list will take you to that solution. Also, you can use the Switch Views button in the Solution Explorer toolbar to take you back to the list of views to easily move between solutions in your repository.
In the case you have only one solution in your repository, Visual Studio will load solution view by default. On the other hand, if you have no solutions in your repository, Visual Studio will open folder view by default. You can toggle this feature on/off using its own Preview Feature checkbox in Tools | Options.
The new Git experiences are also coming to your Live Share experience. Now you can view the contents of the Git windows in read-only mode when you are a Guest in a Live Share session.
We’ve been listening to the feedback on the Git Repository window and have been making incremental tweaks. Also in this release, is the ability to single click to switch between branch histories while browsing through branches in your repo.
There are now C# and Visual Basic support for inline parameter name hints that insert adornments for literals, casted literals, and object instantiations prior to each argument in function calls. In order to access this feature, you will need to turn this option on in Tools > Options > Text Editor > C# or Basic > Advanced and select Display inline parameter name hints (experimental). The inline parameter name hints will then appear in C# or Visual Basic file.
In addition, you can now extract members from a selected class to a new base class with the new Extract Base Class refactoring. To give this a try, place your cursor on either the class name or a highlighted member. Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. From there, select Pull member(s) up to new base class. The new Extract Base Class dialog will open where you can specify the name for the base class and the location of where it should be placed. You can select the members you want to transfer to the new base class and choose to make the members abstract by selecting the checkbox in the Make abstract column.
Once you select Ok you will see the new base class added along with its members.
Another feature is a code fix to convert instances of typeof in C# and GetType in Visual Basic. Using nameof instead of the name of the type avoids the reflections involved when retrieving an object. As shown below, place your cursor within the typeof(<QualifiedType>).Name. Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. Next, select from one of the following options:
For C#, select Convert `typeof` to `nameof`:
For Visual Basic, select Convert `GetType` to `NameOf`:
WPF, UWP, and Xamarin.Forms Tooling
In this release we’ve worked to make additional improvements to XAML Hot Reload experiences, changes include:
Also, in this release we begin to rollout support for a highly requested feature. Forms “changes only” XAML Hot Reload now supports UWP. This enables the new changes only XAML Hot Reload support in Xamarin.Forms Projects when targeting UWP. Please note this feature is still in development. While editing XAML will now trigger updates in the running app, other features such as in-app toolbar (element selection, etc.) are not yet fully implemented and can have unpredictable behavior.
As part of a bigger effort that will be completed across multiple 16.8 Preview release comes XAML Hot Reload Settings moved to “Debugging > Hot Reload”. We’re starting to consolidate the XAML Hot Reload settings across WPF, UWP and eventually Xamarin.Forms into a unified settings location. In this release we’ve started this process by moving the existing desktop settings out of the Debugging > General > Enable UI Debugging Tools for XAML and into a new location under Debugging > Hot Reload. No settings will be changed during this migration so all your existing choices will continue to stay in effect. Also, for the first time ever we’re enabling the ability to disable/enable XAML Hot Reload support per-platform, meaning you can disable these experiences for WPF, UWP or both.
Give Visual Studio 2019 v16.8 a Try Today!
We hope you are as excited about these features as our teams. We are also continually working towards more product stability and performance improvements. Please let us know how we are doing, and we hope you have a productive day using Visual Studio 2019.
Love the new refactorings, with support for both VB and C#. Any updates on when Forms Designer will be feature complete, including supporting User Controls, Inherited Controls, Settings Designer, VB Core Templates, I hope before release these features will need a lot of feedback.
+1 need more info on it.
Yes on WinForms, especially when designing forms to be installed and run on 1080p clients, but are developed on a high DPI / 4K monitors. How can we ever have confidence the designer view is an accurate representation of what users will see? AFAICT it misses the mark big time. 😢
Yes, full agree.
@VS Team, please give more information about VB.Net!
Are there any breaking changes with this update for blazor?
Because we cannot start any applications anymore and we need to find the root of this problem.
Looks like issue effecting blank attributes – see https://github.com/dotnet/aspnetcore/issues/25267 for issue and workaround,
Not sure about the typeof -> nameof refactoring. In an obfuscated software this is not equivalent, as nameof is resolved before obfuscation and typeof is during runtime and therefore after obfuscation.
Thanks Christian for the feedback! We still think this suggestion is helpful but as always, its ultimately up to you whether this suggestion makes sense in your own code.
Love the parameter naming hints in C# (Resharper has had this for a couple of versions now), but can we have them in C++ too, please (again like Resharper does)?
Thanks Mike! Happy to hear you like it! Feel free to create a feature request on Developer Community to have this work in C++.
Inline parameter name hint does not work for File.OpenText. And also in other places (including custom methods).
I know VB.NET is not your “little baby” anymore but we have now VS16.8 with netcore 5 pre 8 and still NO Templates for the WinForms to test!
Thanks for the release notes, We found that Preview 2 is fixing few breaking changes in arm64 Release configuration builds. Due to legal constraints, we will not be able to compile my code with VS Preview 2 and release it. Can you please inform us the planned release date of Preview 2? This would help us finding the release date for my product. Thanks again!!!
Thank you for your comment. I assume you meant when is 16.8 Preview 3 is shipping? Typically we never publicly share specific release dates, as there’s always chance release plans change. Regarding the ARM64 release configuration build issues, can you please list what specific issues you refer to in Developer Community? We’d be happy to look into those and give you confirmation on their resolutions.
How do I get my visual Studio update to bring it up to V16.8; Claims to be up to date at 16.7.2
I am keen to try .net 5 – but need this minimal version of VS
16.8 features are on our Preview channel which is a separate instance of Visual Studio. You can find the download links here. I hope this is helpful and that you enjoy .NET 5!
Is there a time line for when we should expect full functionality in the WinForm/WPF designers for .NET Core 5?
The CodeLens References popup (for C#) hangs Visual Studio from time to time, both in Preview 2 & 3. It also has problems with references to constructors. It reports each call twice: one for the “new” keyword and then for the constructor name.