Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Roslyn Cookbook

You're reading from   Roslyn Cookbook Compiler as a Service, Code Analysis, Code Quality and more

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781787286832
Length 350 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Manish Vasani Manish Vasani
Author Profile Icon Manish Vasani
Manish Vasani
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Writing Diagnostic Analyzers FREE CHAPTER 2. Consuming Diagnostic Analyzers in .NET Projects 3. Writing IDE Code Fixes, Refactorings, and Intellisense Completion Providers 4. Improving Code Maintenance of C# Code Base 5. Catch Security Vulnerabilities and Performance Issues in C# Code 6. Live Unit Testing in Visual Studio Enterprise 7. C# Interactive and Scripting 8. Contribute Simple Functionality to Roslyn C# Compiler Open Source Code 9. Design and Implement a New C# Language Feature 10. Command-Line Tools Based on Roslyn API

Introduction


This chapter enables developers to add new functionality to the Roslyn C# compiler. Let's briefly walk through the different parts of the Roslyn source tree. You can take a quick look at the topmost source folder of the Roslyn repo in the VS2017 branch: https://github.com/dotnet/roslyn/tree/Visual-Studio-2017/src

https://github.com/dotnet/roslyn/tree/Visual-Studio-2017/src

The most important source folders and corresponding components are:

  • Compilers: This implements the Roslyn C# and VB compilers and the core Microsoft Code Analysis layer, which exposes the rich-language agnostic API to perform syntactic and semantic analysis of source code. Core concepts of this layer are SyntaxTree (source file), SemanticModel (semantics of a source file), Symbol (declaration in source), and Compilation (collection of source files and options).
  • Workspaces: This implements the Workspaces layer and the corresponding APIs to do workspace-level code analysis and refactoring of projects and solutions...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime