I am building a .net core 6 project. I've added a fairly complex .editorconfig file, which is only causing problems building on the BB build server.
I get zero build problems if I build from Visual Studio, or `dotnet build` on the command line. When I run exactly the same dotnet build command in the bitbucket-pipeline.yml, I get build errors (specifically IDE0055, but I've fixed others already).
I've also tried using the official .net6 sdk docker image locally, and I get no errors.
It appears to be a problem with the BB build server, but I'm stuck for ideas.
bitbucket-pipeline.yml (snippet):
image: mcr.microsoft.com/dotnet/sdk:6.0
script:
- dotnet restore $SOLUTION_NAME.sln
- dotnet build --no-restore --configuration Debug $SOLUTION_NAME.sln
`
If anyone else gets this issue, it's to do with line endings.
.gitattribute
text=auto
This will change the line endings to match the OS.
.editorconfig
end_of_line = CRLF
This forces to always use Windows line endings.
This will fail the build because the builds are Linux, but the config says it should be Windows.
The answer is:
end_of_line = unset
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.