roslyn: IDE0055 triggered incorrectly with UNIX only line ending
Version Used: “C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\csc.exe” Microsoft ® Visual C# Compiler version 3.10.0-4.21269.26 (02984771) Copyright © Microsoft Corporation. All rights reserved.
Steps to Reproduce: This constantly popup during my project build. The fix is to change from UNIX “0x0a” to DOS “0x0d 0x0a” on that specific line only.
NLogLoggerGeneric.cs(8,50): error IDE0055: Fix formatting
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 2
- Comments: 22 (12 by maintainers)
Commits related to this issue
- do not enforce line endings from .editorconfig (due to IDE0055 error when building on Linux) see https://github.com/dotnet/roslyn/issues/55526 — committed to havit/Havit.Blazor by hakenr 8 months ago
- do not enforce line endings from .editorconfig (due to IDE0055 error when building on Linux) see https://github.com/dotnet/roslyn/issues/55526 — committed to havit/NewProjectTemplate-Blazor by hakenr 8 months ago
Putting this frustrating matter aside, I welcome everyone to reflect on the amusing fact that now, in 2022, we have this bug report for the C# compiler’s static code analysis feature because 60 years ago some people needed to instruct electromechanical teleprinters.
There are three reasons why this could be occurring:
text=auto
for the line that applies to *.cs files)Environment.NewLine
is\r\n
end_of_line
value