Visual Studio Macro to Format all Files in a Solution

后端 未结 3 1929
青春惊慌失措
青春惊慌失措 2020-12-10 19:38

I\'ve recently settled on a new format style for my code and want to replace the existing code. The only problem is there\'s 100\'s if not 1000\'s of files in my solution a

3条回答
  •  旧时难觅i
    2020-12-10 20:18

    There's a new way to format all files in a solution without using a macro using the dotnet CLI:

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

提交回复
热议问题