0

I work on a distributed team and we have lots of code analysis styles set to Error which keeps the code in pretty good shape style-wise. However, the one that keeps coming up is CS0169 for unused variables.

I realise that this is not actually a code analysis error and is coming from the compiler.

How can I get it error rather than show a warning? I tried adding it to the Code Analysis rule set (despite it not being available in the editor!) hoping to trick it! But no luck ...

Thanks

enter image description here

Andy Clarke
  • 3,234
  • 5
  • 39
  • 66
  • [Treat All Warnings As Errors](http://stackoverflow.com/questions/17533008/treat-all-warnings-as-errors)? – stuartd Feb 10 '17 at 12:03
  • That must be really annoying during development. I usually have a lot unused code before I put everything together. Can't you specify a separate rule-set for Debug builds? – Manfred Radlwimmer Feb 10 '17 at 12:03
  • It's surprising actually ... we trialled it on a few whitespace warnings and you quickly train your brain to not do it. I rarely see any of the errors anymore. – Andy Clarke Feb 10 '17 at 12:05

0 Answers0