is there an option how to disable that #if, #endif and other directives are not indended after Edit -> Advanced -> Format document in Visual Studio?
Thank you!
Look at StyleCop.
StyleCop analyzes C# source code to enforce a set of style and consistency rules. It can be run from inside of Visual Studio or integrated into an MSBuild project. StyleCop has also been integrated into many third-party development tools.
You can even add custom rules: Creating Custom Rules for Microsoft Source Analyzer
Hope it helps.
2.1m questions
2.1m answers
60 comments
57.0k users