Visual Studio 2019
2019/04/02
Visual Studio 2919 is now GA (and the release notes themselves are a 66-minute read!).
I’ve been using the VS 2019 preview for some month now and have been very happy with the improvements.
The biggest highlights:
LiveShare!
Gone are the days of video screen sharing with bad connections where the code is barely readable.
Live Share not only allows editing code remotely, but also debugging and executing it.
It’s now installed by default and there is also an extension for VS Code.
Faster startup
Ever since VS 2017 there has been serious focus on improving performance and VS 2017 was the first version that made me ditch ReSharper as stock VS 2017 was so much faster without it while offering just enough features (and other extensions) to keep me productive without it.
VS 2019 has even better performance regarding startup and project loading.
I feel like building has gotten faster as well but that may just be because I’ve been mainly using the latest .Net Core which has incremental builds since .Net Core 2.1.
Quick search
I wasn’t really a fan of the quick search feature in VS 2017 due to it being slow and the search not being very good, but I find myself using it more and more in VS 2019 as it is much faster and has improved fuzzy searching as well as a better result visualization.
C# Refactoring
Sync namespace to folder name. Finally.
This has been the only feature that I missed from ReSharper that I couldn’t find an extension for. Now VS 2019 has a refactoring fix to adjust the file namespace of a file to match its folder.
To me this feature is very helpful in early stages of projects and larger refactorings where file and folder structures change significantly.
Right now the feature only works if you run it manually in each file (via Ctrl + .) but it already fixes the usings in other files to point to the new namespace which is super helpful.
I hope a future version will allow global refactoring ala “fix all namespaces” so I can just run it once after a refactor and be done with it.
Background updates
Finally Visual Studio can download updates automatically for extensions/itself in the background.
Let’s hope they also fix “the updater needs to update itself before you can update Visual Studio” Every. Single. Time.
Even more goodies
VS 2019 doesn’t really bring very big new features. instead it brings a ton of tiny features and all of them exciting in their own way.
Here’s some awesome stuff that I have already that I find exciting:
- even faster startup than VS 2017
- Xamarin has seen many improvements:
- faster builds (2-3x)
- reduced install size
- faster project creation (2x)
- many small improvements of the XAML previewer (drag & drop support, live preview, properties dialog, ..)
- Document health indicator
- Many more cleanup and refactor improvements
- searchable watch and locals windows! Gone are the days of unfolding 20+ items to find the correct object/dictionary entry
- new D8/R8 Android compiler/linker (still preview, so need to be enabled manually)
- created APKs are as much as 50% reduced in size
- builds have gotten more reliable
I haven’t even gotten around to playing with the previews of .Net Core 3 and C# 8 yet but I’m really looking forward to all the syntactical sugar such as pattern matching, switch expressions and nullable reference types.
Extensions
As I mentioned already, I haven’t used ReSharper in a while mainly due to performance issues but also because Visual Studio 2017 and onwards have made significant improvements in regards to the refactorings they offer.
Nevertheless, I still use many extensions to further improve my productivity:
- Roslynator 2019 - A collection of 500+ roslyn analyzers and refactorings for C#
- Git Diff Margin - See red/green markers in the scrollbar margin for any uncommited changes
- Match Margins - Will add markers to scrollbar margin depending on context (e.g. selected variable = markers for all usages in current file), helps me a lot with navigating
- Output enhancer - color for outputs to better visualize errors/warnings
- VSTricks - Sub word navigation (UseCamelHumps from ReSharper)
- Power Commands many small improvements:
- Remove & sort usings
- Format document on save
- Close all
- Reload project
- Open containing folder (I’ve set it to F3 as a keyboard shortcut)
If you haven’t used any of these extensions I recommend you check them out!
Also check out the full release notes for VS 2019 GA for all the other improvements they have made.