Re: VS2022 format all files

2023-04-11 Thread Greg Keogh
Bingo! Thanks David, I'll admit that I have neglected the Code Cleanup feature and it went out of my mind. I have fiddled with it occasionally over the years but I couldn't get it to work the way I wanted. But this time I concentrated and: • Set all the Tools Options C# preferences I want (takes t

Re: VS2022 format all files

2023-04-11 Thread Alan Ingleby
There's also a command line tool called dotnet-format which may do part of what you are looking for. https://github.com/dotnet/format Apparently quite extensible. On Wed, 12 Apr 2023 at 11:18, Greg Keogh via ozdotnet wrote: > Resharper? >> > > I accidentally used it for one day back in about 2

RE: VS2022 format all files

2023-04-11 Thread David Kean
Both of these options can do this on a per solution, project, document basis. [cid:image001.png@01D96D2F.DBC4AB50] If you want to this via command-line, look at dotnet format. These all work better if you’ve got a good .editorconfig that calls the style

Re: VS2022 format all files

2023-04-11 Thread Greg Keogh
> > Resharper? > I accidentally used it for one day back in about 2010 and it was a constant battle of keystrokes and interruptions that drove me bonkers and I'm glad I've never seen it again. I thought Reshaper was basically redundant now that recent VS releases have incorporated most of its orig

Re: VS2022 format all files

2023-04-11 Thread Alan Ingleby
Resharper? On Wed, 12 Apr 2023 at 11:04, Greg Keogh via ozdotnet wrote: > Folks, is there a way to apply commands like *Format Document* and *Remove > and Sort Usings* to multiple C# files, perhaps all open files or all > files in the project? > > Web searches suggest it's not possible at the mo

VS2022 format all files

2023-04-11 Thread Greg Keogh
Folks, is there a way to apply commands like *Format Document* and *Remove and Sort Usings* to multiple C# files, perhaps all open files or all files in the project? Web searches suggest it's not possible at the moment. I see an Extension for this which looks a bit flakey and I won't try it yet.