Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

How to enable/disable any DiagnosticAnalyzer by Id at runtime - Visual Studio Extension 2015 - Roslyn

$
0
0

Hi,

I'm writing some DiagnosticAnalyzer for VS 2015 (Roslyn), I want to implement a dialog options, which allows user to enable/disable any DiagnosticAnalyzer they like, how can I achieve that?

 Currently, as I investigated, DiagnosticDescriptor has property isEnabledByDefault, which only affects at the time you install the extensions. Another the option is to return false in method TryGetDiagnostic of DiagnosticAnalyzer class, but it's not a good way to handle this particular case.

Thanks,

Nha.


Viewing all articles
Browse latest Browse all 4410

Trending Articles