Session

Analyze this: Raise your code quality and follow code standards with the Roslyn analyzers

If you are a developer using Visual Studio, chances are you have noticed squiggly underlines in your code that show up when you have written code the compiler cannot interpret. They are only a small part of the surprisingly extensive Roslyn analyzers tool kit.

Starting with .NET 5 a few analyzers are activated by default, but with some simple configuration, these and hundreds more can be enabled not just for .NET 5+ but previous versions of .NET such as .NET Core and .NET Framework. There are analyzers to help you improve your code quality and analyzers to help you maintain your coding standards. Using .editorconfig files you can configure these analyzers across your entire code base and control which analyzers should be active for different parts of your code base.

In this session, we will dive into how the Roslyn analyzers are activated and configured to display suggestions, warnings, or errors. I will look at strategies on how to add Roslyn analyzers to an existing code base without being swamped in warnings, and show how to validate the rules during a command-line build. Once enabled the Roslyn analyzers help ensure your code is easier to read and safer to run.

Fredrik Ljung

Lead Developer and Architect at Datema Retail

Stockholm, Sweden

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top