Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code Cleanup doesn't do Format document in Visual Studio 2022

I have the following settings regarding my Tab sizing in Visual Studio 17.4.1:

enter image description here

When I use Edit->Advanced->Format Document, I get this result:

enter image description here

I configured Code Cleanup which allegedly contains Format Document:

enter image description here

When I save or explicitely use it, I get this result:

enter image description here

Are there two separate Format Document commands? How should I get the same result?

like image 611
Nestor Avatar asked May 04 '26 07:05

Nestor


1 Answers

I use Visual Studio Community 2022 with Unity, and I had the same issue.

If I launch Visual Studio and click Open Folder to add a project, Code Cleanup won't work. However, if I open a file from Unity, it will launch Visual Studio, and Code Cleanup will work. I can then press Show All Files in Solution Explorer to see the rest of the files.

like image 148
xdth Avatar answered May 05 '26 21:05

xdth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!