I want the build of my project to fail if there are unused usings. In csproj I have added:
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Following the solution mentioned in https://github.com/dotnet/roslyn/issues/41640 In .editorconfig I have added:
dotnet_diagnostic.IDE0005.severity = error
However the build still doesn't fail. The errors are reported in the IDE but the build succeeds.

Could someone let me know what am I missing here? I am using visual studio 2022.
