Introduction to Roslyn and its use in program development

C#Visual BasicCompilers

Please contribute by voting. Thanks!
3

Roslyn is a platform which provides the developer with powerful tools to parse and analyze code. It's not enough just to have these tools, you should also understand what they are needed for. This article is intended to answer these questions. Besides this, you will find details about the static analyzer development which uses Roslyn API.

Roslyn is an open source platform, developed by Microsoft, containing compilers and tools for parsing and analysis of code written in C# and Visual Basic.

Roslyn is used in the Microsoft Visual Studio 2015 environment. Various innovations such as code fixes are implemented by means of the Roslyn platform.

Using the analysis tools provided by Roslyn, you can do a complete code parsing, analyzing all the supported language constructs.

The article can be divided into 2 logical parts:

  • General information about Roslyn. An overview of tools provided by Roslyn for parsing and analyzing the code. We provide a description of entities and interfaces, as well as the point of view of a static analyzer developer.

  • Peculiarities that should be taken into account during the development of static analyzers. Description of how to use Roslyn to develop products of this class; what should be considered when developing diagnostic rules; how to write them; an example of a diagnostic.

More: http://www.viva64.com/en/b/0399/

Article created: Dec 23 '16. Edited Dec 23 '16.

1 Comment

1
Matt Hamilton [8]  •  Jan 23  •   •  Reply

Thanks for a great article! Somewhat related questions:

  • Do you know if Roslyn is open source to 100%?
  • Does it compile and run on Mono?`

/Matt

Your comment

You need to sign up / log in to comment this article

Author

Created by Kate Milovidova [3] Dec 23 '16

Share article

Do you know about

JSON?

Write an article