Thursday, January 6, 2022

Great Start to the Year: Visual Studio 17.1 Preview 2 is Now Available

It's another year and a newer preview version of Visual Studio 2022 is already out, Visual Studio 2022 version 17.1 Preview 2.  This Preview version got shipped with some very nice features related to,
  • .NET Productivity
  • Git Tooling
  • Code Editor
  • IDE
  • Test tools
  • And more
These include some features that I have been waiting for so long.

.NET Productivity: Go to Definition, Navigate to the Original Source File


This is my favorite of them all and it's a fantastic feature. Now when we do Go to Definition, we are being navigated to the original source file. This is tremendously helpful in situations like we are exploring .NET APIs.

For example, say I need to go to the definition of AddDbContext<TContext>(...)
Go to Definition in Visual Studio 17.1 Preview 2
I can see the full implementation, whereas in prior versions, I am not seeing the method body.
Go to Definition in Earlier Version of Visual Studio

Git Tooling: Enable line-staging support


This one is another favorite. All this time, after doing a change in a file, we could only stage the whole file, not hunks. This feature has been there in most of the other Git tools out there for so many years, but was lacking in Visual Studio Git experience. Now finally, it's arrived.

This feature is not enabled by default, you need to explicitly turn this on. You can do it by navigating into Tools -> Options -> Environment -> Preview Features.
Enable line-staging support
And then we can stage hunks individually if we want to.
Stage Changes/Hunks

Editor: Code Cleanup on Save


Another nice One. With this feature we don't have to do  Ctrl+K, Ctrl+E (code cleanup) explicitly. Visual Studio will do the Code Cleanup on File upon Save automatically. And we can even choose which Profile to be used for the Code Cleanup. This feature again is not enabled by default, you need to explicitely enable it. You can do it by navigating into Tools -> Options -> Text Editor -> Code Cleanup.
Code Cleanup on Save
Aren't these nice?

Read more about all the new features in Visual Studio 17.1 Preview 2,

Happy Coding and Happy New year everyone!

Regards,
Jaliya

No comments:

Post a Comment