1 minute read

The greatest new feature in Visual Studio 2015 is the .NET compiler platform previously known as Roslyn. The .NET Compiler Platform is an open source compiler for C# and VB with rich code analysis APIs. It enables developers to build code analysis tool like code analyzers, fixes and refactorings.

The community has built a number of packages containing great analyzers, fixes and refactorings. These can be installed either as a Visual Studio 2015 Extension or at project level as NuGet packages.

Refactoring Essentials

Refactoring Essentials contains approx. 200 code analyzers, fixes and refactorings Simple defensive code analyzers like parameter checking.

Parameter checking

Simplifying code by converting conditional ternary to null coalescing.

conditional ternary to null coalescing

CSharp Essentials

CSharp Essentials focuses on the new features in C# 6 such as the nameof operator, string interpolation, auto-properties and expression-bodied methods.

String interpolation

Code Cracker

Code Cracker is a smaller package for C# and VB with analyzers e.g. for empty catch blocks and if a disposable object is disposed.

Disposable

SonarLint

SonarLint for C# has great analyzers too as Christiaan Rakowski points out in the comments. One of them warns about logical paths that will never be reached or simplified.

Conditional structure

Platform Specific Analyzer

With Windows 10 and the new Universal Windows Platform you as the developer need to make sure that the Windows App does not use an API not supported on the platform you are targeting. This is exactly what the Platform Specific Analyzer package does for both C# and VB.

Platform specific

If you know any other great packages – let me know.

Comments