VivekDev
VivekDev

Reputation: 25507

Remove unnecessary usings with dotnet format

We have dotnet format to apply formatting to csproj or even sln file for the entire solution.

I can do that using Visual Studio 2022 Quick Action Light Bulb feature.

Visaul Studio Quick Action Light Bulb feature in Visual Studio 2022

So is there a way I can do that using dotnet format command configured using editorconfig settings?

Upvotes: 12

Views: 5775

Answers (1)

Casper Bang
Casper Bang

Reputation: 967

If you include the following in your .editorconfig file, it is now supported:

dotnet_diagnostic.IDE0005.severity = error

I tried to find anywhere in the changelog where this is referenced, without success.

However do be aware: that you might need to update your IDE, as Rider version 2021 doesn't know that tasks are standard now.

Upvotes: 19

Related Questions