In Visual Studio 2015 (after installing the SDK preview), I created a 'diagnostic with code fix' project. The skeleton code is full of interesting types such as DiagnosticAnalyzer
(under Microsoft.CodeAnalysis.Diagnostics) and CodeFixProvider
(under Microsoft.CodeAnalysis.CodeFixes).
Where can I read the docs for these types? I couldn't find them on msdn. All I found was a different namespace with a confusingly similar name System.Diagnostics.CodeAnalysis .
Ideally msdn would have a full guide to writing a DiagnosticAnalyzer, as well as the usual reference documentation.
These are all Roslyn related, so the best place to look is the Roslyn documentation
It has samples, walkthroughs, FAQ, etc. Specifically here's a PDF file showing How To: Write a C# Diagnostic and Code Fix using a DiagnosticAnalyzer
.
MSDN doesn't usually have information on technologies still in preview. I can only guess that until VS 2015 ships all the MSDN articles would be published (but we'll have to wait and see).
Roslyn is now moved to https://github.com/dotnet/roslyn
I think still the documentation is not that very great...!
my personal openion
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