I set up an editorconfig file for my project and it works perfectly in my IDE and throws the right warnings. Examples: IDE0052 (unused variables) and IDE0055 (wrong formatting).
However, I would like to enforce the warnings from my editorconfig as errors during Build so that it fails. Is there any way to do this? Setting properties "MSBuildTreatWarningsAsErrors" or "TreatWarningsAsErrors" to true in the csproj hasn't done anything.
Thank you!