Your friendly neighborhood .NET productivity team (aka. Roslyn) focuses a lot on improving the .NET coding experience. Sometimes it’s the little refactorings and code fixes that really improve your workflow. You may have seen many improvements in the previews, but for all of you who were eagerly awaiting the GA release here’s a few features you may enjoy!
I’m most excited about the new Roslyn classification colors. Visual Studio Code colors received high praise so we incorporated similar color schemes into Visual Studio. Your code editor is now just a little more colorful. Key words, user methods, local variables, parameter names, and overloaded operators all get new colors. You can even customize the colors for each syntax classifications in Tools > Options > Environment > Fonts and Colors and scroll to ‘User Members’.
At the bottom of files in your editor are the document health indicators as well as our code cleanup icon. The document health indicators let you know at a glance how many errors and warnings are present in the file you currently have open. You can click on the code cleanup icon to apply code style rules specified in Tools > Options or, if you have an editorconfig file that shares one code style across your team, it will apply styles specified in that file.
You can edit sdk-style project files with a simple double-click! You can also view these project files with preview in GoToAll (Ctrl+t) navigation and search the contents for file references.
Load a subset of projects in your solution with filtered solutions! You can now unload projects and save a .slnf file that will only open the projects you specified. This helps you get to the code you are interested in quickly without needing to load an entire solution.
Find all references categorizes by reference type. You can filter by read/write in the new ‘Kind’ column in the find all references window.
Run code style formatting over the entire solution at the command-line with the
dotnet format global tool.
Intellicode is an extension offering smarter intellisense completion with machine-learning trained models run over 2,000 open source .NET repositories on GitHub.
Now the omnibus of new code fixes and refactorings!
Foreach to LINQ
Add missing reference for unimported types
Sync namespace and folder name
Invert conditional expressions
Pull members up dialog for promoting members to an interface
Remove unused expression values and parameters
This is a set of highlights of what’s new in Visual Studio 2019, for a complete list see the release notes. As always, I would love your feedback via twitter, on GitHub, or in the comments section below. Also, one important thing to note is that to use .NET Core 3.0 Preview you will need to download and installthe SDK, it is not included with the Visual Studio 2019 installer yet.
Program Manager, .NET and Visual Studio