I've set various C# Code Style rules to generate errors, and while violations show up as errors in the IDE (both in the error list and the text editor), actual builds still succeed.
Can anyone confirm this? I've tested on VisualStudio/15.0.0+26228.9 under both the Community (at home) and Enterprise (at work) editions. And I can't get any build to break due to a code style violation.
I've even tried to use .editorconfig, and builds still go through...
Suppress specific warnings for Visual C# or F# Or, select the project node and press Alt+Enter. Choose Build, and go to the Errors and warnings subsection. In the Suppress warnings or Suppress specific warnings box, specify the error codes of the warnings that you want to suppress, separated by semicolons.
In Visual Studio, go to the menu bar and choose Help > Send Feedback > Report a Problem, or submit a suggestion by using Help > Send Feedback > Send a Suggestion. You may find additional assistance for errors and warnings in Microsoft Docs Q&A forums.
To display the Error List, choose View > Error List, or press Ctrl+\+E.
Update:
This has not been implemented yet. This is now tracked as a project on GitHub at: https://github.com/dotnet/roslyn/projects/18 - check there for updates.
Original response:
I've opened a VS question on this at: https://developercommunity.visualstudio.com/content/problem/48804/editorconfig-with-rules-set-to-error-produces-erro.html that will hopefully provide some answers on why errors coming from the new .editorconfig support in VS2017 do not fail builds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With