C#C
C#2y ago
Rhythmic

No namespace = folder warnings in VS

I don't get IDE0130 warnings in my C# project (namespace does not match folder structure).

Here's an example of a .cs file which should give me the warning:
using OsuTimer.Classes.Utility; namespace OsuTimer.Classes.Visual; public partial class BlockAmountScrollBar : LabeledScrollbar { //Code omitted }

The script is in a subsfolder called "Scrollbars", so the namespace does not match the folder name. See picture

I have ensured .editorconfig has dotnet_style_namespace_match_folder= true
I have added <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> in <PropertyGroup>...</PropertyGroup> to my .csproj
I have restarted VS and built the solution.
I have run Analyze -> Run Code Analysis -> On Solution

Any ideas?
image.png
Was this page helpful?