Skip to content

Format files in the root solution folder during msbuild #1765

@aleksator

Description

@aleksator

Currently the files in the solution folder, such as Directory.Build.props, Directory.Packages.props, and others, are not formatted during msbuild.
We also have custom XMLs in the root folder, which would be good to have formatted with CSharpier.

Environments:

  • CSharpier Version: 1.2.1
  • Running CSharpier via: msbuild
  • Operating System: Windows/Linux
  • .csharpierrc Settings: -
  • .editorconfig Settings:
indent_style = tab
indent_size = 4

Steps to reproduce:
Add:

    <GlobalPackageReference Include="CSharpier.MSBuild" PrivateAssets="all" Version="1.2.1" />

to Directory.Packages.props.
Run dotnet build or build via an IDE.
Expected behavior:
Directory.Packages.props and other files in the root directory, containing .sln are formatted.
Actual behavior:
Directory.Packages.props and other files in the root directory, containing .sln are not formatted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions