Microsoft itself has an official extension for this called Productivity power tools
VS2017 & VS2019:
https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.ProductivityPowerPack2017
VS2022:
Yet to incorporate this formatting feature
https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.ProductivityPowerPack2022