Support formatting .csproj .sln
Hi I just noticed that the .csproj file isn't formatted when running dotnet-format.
I'm assuming it's the same for .sln.
Think it would be a good to also format these files.
It would be nice to also format Solution Files (for example, docker-compose.yaml). At least whitespace/tabs + newlines.
I took a stab at making a csproj formatter once, I found some neat ways I could trick the msbuild project system to load my csproj files while preserving formatting.
My code supports a few scenarios:
- Newlines between elements
- Sort package and project references
- Simplify some elements (package references with child elements instead of attributes)
It could work as a starting point for what's possible. It'd be great to have this and more in dotnet-format instead of my code.. :)
@JoeRobich Any updates on this one?
Just checking the basic editorconfig rules like indentation, eol, etc. should be fine in this case. A large part of the code for that should already be present in dotnet-format anyways.
The team quite often manage to commit tabs in our *.csproj files and our dotnet-format based linter is not able to catch this.