Formatting - at once - all the files in a Visual Studio project

后端 未结 6 1310
小蘑菇
小蘑菇 2020-12-04 15:29

I am interested in formatting all the files in a Visual Studio (ver. 2005) project all at once.

Currently, there is a way to format a single document by doing somet

6条回答
  •  有刺的猬
    2020-12-04 16:00

    There's a new way to format all files in a Visual Studio project using the dotnet CLI:

    1. Install dotnet format by running the following command:
      dotnet tool install -g dotnet-format
    2. Run it, replacing ProjectFile.csproj with the path to your project file, with the following command line:
      dotnet format ProjectFile.csproj

提交回复
热议问题