Certain .editorconfig rules are ignored in 8.0.200 and newer versions
Describe the bug
I have an .editorconfig file in a sub folder of my project with the following rule:
dotnet_diagnostic.IDE0022.severity = none
When I'm on SDK version 8.0.102 that rule works and is ignored.
When I'm on SDK version 8.0.200 or 8.0.201 I see the error:
To Reproduce
https://github.com/Tiberriver256/dotnet-802-editor-config-ignored-issue
The repo above should have IDE0022 shown in build errors. Change the sdk.version in the global.json to 8.0.102 to see the error go away.
Exceptions (if any)
N/A
Further technical details
The error shows whether I use Visual Studio, Visual Studio Code, or dotnet build.
It isn't broken for all rules. I can override CA1852 just fine.
.NET SDK:
Version: 8.0.201
Commit: 4c2d78f037
Workload version: 8.0.200-manifests.e575128c
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.201\
.NET workloads installed:
There are no installed workloads to display.
Host:
Version: 8.0.2
Architecture: x64
Commit: 1381d5ebd2
.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
6.0.127 [C:\Program Files\dotnet\sdk]
6.0.419 [C:\Program Files\dotnet\sdk]
7.0.313 [C:\Program Files\dotnet\sdk]
8.0.101 [C:\Program Files\dotnet\sdk]
8.0.200 [C:\Program Files\dotnet\sdk]
8.0.201 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
C:\my\personal\dotnet-802-editor-config-ignored-issue\global.json
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Related to https://github.com/dotnet/roslyn/issues/72094?
Similar issue here for 8.0.202. A context action for "fix formatting" was no longer showing up in Rider after upgrading from 8.0.101.
I noticed that no *.editorconfig files were present within 8.0.202/Sdks/Microsoft.NET.Sdk/codestyle/cs/build/config/
$ ls ./8.0.202/Sdks/Microsoft.NET.Sdk/codestyle/cs/build/config
analysislevelstyle_all.globalconfig
analysislevelstyle_none.globalconfig
analysislevelstyle_default.globalconfig
analysislevelstyle_recommended.globalconfig
analysislevelstyle_minimum.globalconfig
Here is what this looks like for 8.0.101:
$ ls ./8.0.101/Sdks/Microsoft.NET.Sdk/codestyle/cs/build/config
analysislevelstyle_all.editorconfig
analysislevelstyle_default.editorconfig
analysislevelstyle_minimum.editorconfig
analysislevelstyle_none.editorconfig
analysislevelstyle_recommended.editorconfig
New to dotnet so I might be stating the obvious but will be switching back to 8.0.101 for the time being.
@jaredpar is this something that we should transfer to roslyn?
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
This one is related to another issue that Todd is looking at.
Actually this issue is just a duplicate of #72094