SonarAnalyzer for C# and VB.NET
Relicensed Facts checked 26 Nov 2026
Sonar's Roslyn code analyzers moved from LGPL-3.0 to a source-available licence in November 2024. They are still free to use, but no longer open source, and the licence limits some uses, including feeding the results to outside AI tools.
- Was
- LGPL-3.0
- Now
- SONAR Source-Available Licence v1.0 (from 10.3)
- Last free version
9.32.0.97167- First paid version
10.3.0.106239- Changed
- Nov 2024
- Still free for
- Still free of charge, but only for "non-competitive purposes". The licence excludes offering anything that competes with SonarQube, and also excludes using outside AI tools to analyse or interact with the data the analyzer produces.
- NuGet
- SonarAnalyzer.CSharp, SonarAnalyzer.VisualBasic (latest 10.37.0.15768, 124M downloads)
- Source
- github.com/SonarSource/sonar-dotnet
Free alternatives
Included in the .NET SDK. Turn on more rules with AnalysisLevel and AnalysisMode in your project file.
500+ analyzers, refactorings and fixes. A .NET Foundation project.
NuGet: Roslynator.Analyzers
Analyzers for good practices in performance, security and design.
NuGet: Meziantou.Analyzer
Style and consistency rules.
NuGet: StyleCop.Analyzers
- Pin 9.32.0.97167Stay on the last free version
The last LGPL-3.0 release (August 2024).
Staying on the last free version
Pin the exact version so an update can't move you onto the paid licence by accident:
<PackageReference Include="SonarAnalyzer.CSharp" Version="[9.32.0.97167]" />A pinned version gets no new fixes. Check for security advisories before relying on it long term.
Notes
- If you use AI coding assistants that read analyzer output, check the licence's "Non-competitive Purpose" definition before relying on version 10.3 or later.
Sources
- SONAR Source-Available Licence v1.0 (sonar-dotnet repository)
- SonarAnalyzer.CSharp 9.32.0.97167 (last LGPL release) on NuGet
Something wrong or out of date? Edit this page on GitHub.