Skip to content

Getting "The file did not end with a single newline" after upgrading from 0.25 to 0.26.2 #1025

Closed
@loraderon

Description

Hi,

Many of our files are reporting "The file did not end with a single newline" when run on the CI build. I have tried 0.26 and 0.26.2 and both are failing.
The build are running on hosted agents in Azure DevOps, which are running Ubuntu and .NET 7.0.404. We have developers using both Mac and Windows and are using the CSharpier.MsBuild package.

Error /home/vsts/work/1/s/src/services/xxx/app/Program.cs - Was not formatted.
  The file did not end with a single newline.

##[error]/home/vsts/.nuget/packages/csharpier.msbuild/0.26.0/build/CSharpier.MsBuild.targets(19,5): Error MSB3073: The command "dotnet "/home/vsts/.nuget/packages/csharpier.msbuild/0.26.0/build/../tools/csharpier/net7.0/dotnet-csharpier.dll"  --check --no-msbuild-check "/home/vsts/work/1/s/src/services/xx/app" > /dev/null " exited with code 1.

image

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