Roslyn Cookbook

Key FeaturesMake use of the Roslyn service API to enforce “house rules” on code, without having to become a compiler expert on your ownCreate diagnostics and refactoring to help developers enforce conventions and design idiomsInterface with tools like Z3 and Puma to perform Taint Analysis and Code Forensics.Book DescriptionIt will begin by explaining the fundamental tasks that you require to perform on your source code during day to day work. You will learn to write different category of analyzers to analyze source code and report warnings and errors and learn how to harness third party Roslyn analyzers for your C# projects. Moving ahead, it will show you how to improve code maintenance and readability by using the code fixes and catch security and performance issues in your C# code by using popular third party analyzers such as PUMA scan analyzers and FxCop analyzers. By the end you will be able to make your code base more maintainable, secure and performant and also improve their productivity by using tools such as live unit testing, code rush, popular third party analyzers, etc.What you will learnWrite extensions to analyze source code and report warnings and errors.Harness third party Roslyn analyzers for their C# projects.Edit C# source code to fix compiler/analyzer diagnostics or refactor source code.Improve code maintenance and readability by using code fixes.Catch security and performance issues by using PUMA scan analyzers and FxCop analyzers.Contribute simple functionality to Roslyn C# compiler open source code.Design a new C# language feature and implement various compiler phases for a new language feature.Perform Live Unit tests in Visual Studio.Write command line tools to analyze and edit C# code.Work with CodeRush, a very popular third party VS extension based on the Roslyn API.About the AuthorManish Vasani is a Senior Software Developer working for Microsoft Corporation based in Redmond, WA, US. He is extremely passionate about working on extensible compiler platforms designed to enable rich analysis scenarios. He has done his masters in Computer Science at Columbia University, New York with focus on compiler design under the guidance of professor Alfred V. Aho. He has roughly about 10+ years of work experience at Microsoft, and have been on the Roslyn Managed Languages team since mid-2011. During this time, he has worked on the Roslyn compiler and IDE teams as well as on the new Roslyn project system for .NetCore projects. He is currently working on the Roslyn analyzers team and was part of the design team for the analyzer and code fix API and implemented the analyzer driver that executes the analyzers in the compiler and VS IDE. They are also working towards porting FxCop code analysis rules to FxCop analyzers.

Author: Manish Vasani

Do you want ot get/download the Roslyn Cookbook as Paperback or Kindle/pdf eBook?

Get the Book