# SonarScanner for .NET

<details>

<summary>SonarScanner for .NET — 11.2.0.135473 | <a href="https://github.com/SonarSource/sonar-scanner-msbuild/issues">Issue Tracker</a></summary>

**11.2.0.135473** <sup><sub>**2026-03-09**<sub></sup>\ <sup>This release improves verbose flag handling and SCA/telemetry defaults, and fixes issues with log message processing and coverage collector detection.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/11.2.0.135473/sonar-scanner-11.2.0.135473-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/11.2.0.135473/sonar-scanner-11.2.0.135473-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/11.2.0.135473)

***

**11.1.0.132901** <sup><sub>**2026-02-02**<sub></sup>\ <sup>This release enhances telemetry, streamlines data collection, and updates dependencies to improve performance and insights</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/11.1.0.132901/sonar-scanner-11.1.0.132901-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/11.1.0.132901/sonar-scanner-11.1.0.132901-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/11.1.0.132901)

***

**11.0.0.126294** <sup><sub>**2025-10-15**<sub></sup>\ <sup>The Scanner for .NET does not embed the SonarScanner CLI anymore and downloads it when needed. Adds support for MSTest 4.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/11.0.0.126294/sonar-scanner-11.0.0.126294-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/11.0.0.126294/sonar-scanner-11.0.0.126294-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/11.0.0.126294)

***

**10.4.1.124928** <sup><sub>**2025-09-23**<sub></sup>\ <sup>Fix a bug that erroneously warns that Community Build is not supported.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.4.1.124928/sonar-scanner-10.4.1.124928-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.4.1.124928/sonar-scanner-10.4.1.124928-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/10.4.1.124928)

***

**10.4.0.124828** <sup><sub>**2025-09-22**<sub></sup>\ <sup>New communication system with SonarQube.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.4.0.124828/sonar-scanner-10.4.0.124828-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.4.0.124828/sonar-scanner-10.4.0.124828-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/10.4.0.124828)

***

**10.3.0.120579** <sup><sub>**2025-07-16**<sub></sup>\ <sup>Support xUnit v3, fix RunDeploymentRoot in trx files, remove sonar.scanner.scanAll analysis warning.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.3.0.120579/sonar-scanner-10.3.0.120579-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.3.0.120579/sonar-scanner-10.3.0.120579-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/10.3.0.120579)

***

**10.2.0.117568** <sup><sub>**2025-06-03**<sub></sup>\ <sup>Fix a vulnerability from embedded scanner-cli.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.2.0.117568/sonar-scanner-10.2.0.117568-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.2.0.117568/sonar-scanner-10.2.0.117568-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/10.2.0.117568)

***

**10.1.2.114627** <sup><sub>**2025-04-16**<sub></sup>\ <sup>Add 'sonar' default truststore passord fallback.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.1.2.114627/sonar-scanner-10.1.2.114627-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.1.2.114627/sonar-scanner-10.1.2.114627-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/10.1.2.114627)

***

**10.1.1.111189** <sup><sub>**2025-03-25**<sub></sup>\ <sup>Maintenance and dependencies updates.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.1.1.111189/sonar-scanner-10.1.1.111189-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.1.1.111189/sonar-scanner-10.1.1.111189-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/10.1.1.111189)

***

**10.1.0** <sup><sub>**2025-03-19**<sub></sup>\ <sup>Maintenance and dependencies updates.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.1.0.110937/sonar-scanner-10.1.0.110937-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.1.0.110937/sonar-scanner-10.1.0.110937-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/10.1.0.110937)

***

**10.0.0** <sup><sub>**2025-03-13**<sub></sup>\ <sup>Fix a vulnerability. Mandate that the truststore password is passed in the end step if used in the begin step. Added support for 7 new languages.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.0.0.110776/sonar-scanner-10.0.0.110776-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/10.0.0.110776/sonar-scanner-10.0.0.110776-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/10.0.0.110776)

***

**9.2.1** <sup><sub>**2025-02-25**<sub></sup>\ <sup>DEPRECATED. Use system trusted certificate or JVM certificate store.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.2.1.110358/sonar-scanner-9.2.1.110358-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.2.1.110358/sonar-scanner-9.2.1.110358-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/9.2.1.110358)

***

**9.2.0** <sup><sub>**2025-02-19**<sub></sup>\ <sup>DEPRECATED. Support for local trust store for private and self-signed certificates.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.2.0.110275/sonar-scanner-9.2.0.110275-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.2.0.110275/sonar-scanner-9.2.0.110275-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/9.2.0.110275)

***

**9.1.0** <sup><sub>**2025-02-06**<sub></sup>\ <sup>Read new properties for downloading plugins</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.1.0.109947/sonar-scanner-9.1.0.109947-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.1.0.109947/sonar-scanner-9.1.0.109947-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/9.1.0.109947)

***

**9.0.2** <sup><sub>**2024-11-12**<sub></sup>\ <sup>sonar.projectBaseDir passed through extraProperties is respected with Azure DevOps extensions. Do not fail during file indexing when a directory cannot be accessed.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.0.2.104486/sonar-scanner-9.0.2.104486-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.0.2.104486/sonar-scanner-9.0.2.104486-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/9.0.2.104486)

***

**9.0.1** <sup><sub>**2024-10-25**<sub></sup>\ <sup>Fix projectBaseDir path detection on Azure DevOps Linux agents.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.0.1.102776/sonar-scanner-9.0.1.102776-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.0.1.102776/sonar-scanner-9.0.1.102776-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/9.0.1.102776)

***

**9.0.0** <sup><sub>**2024-09-27**<sub></sup>\ <sup>Ignore sonar.sources and sonar.tests properties.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.0.0.100868/sonar-scanner-9.0.0.100868-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/9.0.0.100868/sonar-scanner-9.0.0.100868-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/9.0.0.100868)

***

**8.0.3** <sup><sub>**2024-09-13**<sub></sup>\ <sup>Exclude XML files from the new automatic analysis. Do not crash on mlaformed paths. Make sure server-side exclusions are not overridden.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/8.0.3.99785/sonar-scanner-8.0.3.99785-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/8.0.3.99785/sonar-scanner-8.0.3.99785-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/8.0.3.99785)

***

**8.0.2** <sup><sub>**2024-09-02**<sub></sup>\ <sup>Re-enabled sonar.exclusions support. Automatically exclude files passed-in as coverage. Skip transient projects that do not exist after the build.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/8.0.2.98917/sonar-scanner-8.0.2.98917-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/8.0.2.98917/sonar-scanner-8.0.2.98917-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/8.0.2.98917)

***

**8.0.1** <sup><sub>**2024-08-21**<sub></sup>\ <sup>Bug fix release which addresses two issues, improvements on messages emmitted during the analysis.</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/8.0.1.97834/sonar-scanner-8.0.1.97834-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/8.0.1.97834/sonar-scanner-8.0.1.97834-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/8.0.1.97834)

***

**8.0** <sup><sub>**2024-08-12**<sub></sup>\ <sup>The scanner is now supporting multi-language analysis. Files for other languages are automatically picked up (SQL, YAML, XML, JSON, CSS, HTML, JS, TS)</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/8.0.0.97025/sonar-scanner-8.0.0.97025-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/8.0.0.97025/sonar-scanner-8.0.0.97025-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/8.0.0.97025)

***

**7.1.1** <sup><sub>**2024-07-24**<sub></sup>\ <sup>Fixed a small issue when not specifying sonar.host.url (defaults to <https://sonarcloud.io>)</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/7.1.1.96069/sonar-scanner-7.1.1.96069-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/7.1.1.96069/sonar-scanner-7.1.1.96069-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/7.1.1.96069)

***

**7.1** <sup><sub>**2024-07-19**<sub></sup>\ <sup>Fixed a small issue when not specifying sonar.host.url (defaults to <https://sonarcloud.io>)</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/7.1.0.95705/sonar-scanner-7.1.0.95705-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/7.1.0.95705/sonar-scanner-7.1.0.95705-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/7.1.0.95705)

***

**7.0** <sup><sub>**2024-07-18**<sub></sup>\ <sup>This version does not require a JRE to be present on the machine anymore</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/7.0.0.95646/sonar-scanner-7.0.0.95646-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/7.0.0.95646/sonar-scanner-7.0.0.95646-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/7.0.0.95646)

***

**6.2** <sup><sub>**2024-02-16**<sub></sup>\ <sup>Fixes the failing analysis on macOS with .NET 8.0. New optional sonar.http.timeout command line parameter</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/6.2.0.85879/sonar-scanner-6.2.0.85879-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/6.2.0.85879/sonar-scanner-6.2.0.85879-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/6.2.0.85879)

***

**6.1** <sup><sub>**2024-01-29**<sub></sup>\ <sup>Drop support for MSBuild 14, deprecate MSBuild 15</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/6.1.0.83647/sonar-scanner-6.1.0.83647-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/6.1.0.83647/sonar-scanner-6.1.0.83647-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/6.1.0.83647)

***

**6.0** <sup><sub>**2023-12-04**<sub></sup>\ <sup>Packaging change, drop support for .Net Framework 4.6, Net 2.1, and .Net 3.0. Drop Java 11 support. Drop support of SonarQube versions prior to 8.9</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/6.0.0.81631/sonar-scanner-6.0.0.81631-net.zip) [.NET Framework 4.6.2+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/6.0.0.81631/sonar-scanner-6.0.0.81631-net-framework.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/6.0.0.81631)

***

**5.15.1** <sup><sub>**2024-03-26**<sub></sup>\ <sup>Fix analysis on MacOSX with .NET 8 when begin runtime doesn't match with build runtime</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.15.1.88158/sonar-scanner-msbuild-5.15.1.88158-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.15.1.88158/sonar-scanner-msbuild-5.15.1.88158-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.15.1.88158/sonar-scanner-msbuild-5.15.1.88158-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.15.1.88158/sonar-scanner-msbuild-5.15.1.88158-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.15.1.88158)

***

**5.15** <sup><sub>**2023-11-20**<sub></sup>\ <sup>Add an option to specify the scanner's temporary working directory</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.15.0.80890/sonar-scanner-msbuild-5.15.0.80890-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.15.0.80890/sonar-scanner-msbuild-5.15.0.80890-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.15.0.80890/sonar-scanner-msbuild-5.15.0.80890-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.15.0.80890/sonar-scanner-msbuild-5.15.0.80890-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.15.0.80890)

***

**5.14** <sup><sub>**2023-10-02**<sub></sup>\ <sup>Support upcoming SonarQube 10.4 API changes</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.14.0.78575/sonar-scanner-msbuild-5.14.0.78575-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.14.0.78575/sonar-scanner-msbuild-5.14.0.78575-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.14.0.78575/sonar-scanner-msbuild-5.14.0.78575-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.14.0.78575/sonar-scanner-msbuild-5.14.0.78575-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.14.0.78575)

***

**5.13.1** <sup><sub>**2023-08-14**<sub></sup>\ <sup>SonarScanner CLI update</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.13.1.76110/sonar-scanner-msbuild-5.13.1.76110-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.13.1.76110/sonar-scanner-msbuild-5.13.1.76110-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.13.1.76110/sonar-scanner-msbuild-5.13.1.76110-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.13.1.76110/sonar-scanner-msbuild-5.13.1.76110-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.13.1.76110)

***

**5.13** <sup><sub>**2023-04-05**<sub></sup>\ <sup>Support for sonar.token parameter and improved error messages</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.13.0.66756/sonar-scanner-msbuild-5.13.0.66756-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.13.0.66756/sonar-scanner-msbuild-5.13.0.66756-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.13.0.66756/sonar-scanner-msbuild-5.13.0.66756-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.13.0.66756/sonar-scanner-msbuild-5.13.0.66756-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.13.0.66756)

***

**5.12** <sup><sub>**2023-03-17**<sub></sup>\ <sup>Fast PR Analysis Support For Azure Devops</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.12.0.64969/sonar-scanner-msbuild-5.12.0.64969-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.12.0.64969/sonar-scanner-msbuild-5.12.0.64969-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.12.0.64969/sonar-scanner-msbuild-5.12.0.64969-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.12.0.64969/sonar-scanner-msbuild-5.12.0.64969-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.12.0.64969)

***

**5.11** <sup><sub>**2023-01-27**<sub></sup>\ <sup>Fast PR Analysis Compatibility Fix</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.11.0.60783/sonar-scanner-msbuild-5.11.0.60783-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.11.0.60783/sonar-scanner-msbuild-5.11.0.60783-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.11.0.60783/sonar-scanner-msbuild-5.11.0.60783-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.11.0.60783/sonar-scanner-msbuild-5.11.0.60783-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.11.0.60783)

***

**5.10** <sup><sub>**2023-01-13**<sub></sup>\ <sup>Improved FIPS Compliance</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.10.0.59947/sonar-scanner-msbuild-5.10.0.59947-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.10.0.59947/sonar-scanner-msbuild-5.10.0.59947-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.10.0.59947/sonar-scanner-msbuild-5.10.0.59947-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.10.0.59947/sonar-scanner-msbuild-5.10.0.59947-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.10.0.59947)

***

**5.9.2** <sup><sub>**2022-12-14**<sub></sup>\ <sup>Bug Fix Release related to PR analysis</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.2.58699/sonar-scanner-msbuild-5.9.2.58699-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.2.58699/sonar-scanner-msbuild-5.9.2.58699-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.2.58699/sonar-scanner-msbuild-5.9.2.58699-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.2.58699/sonar-scanner-msbuild-5.9.2.58699-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.9.2.58699)

***

**5.9.1** <sup><sub>**2022-12-06**<sub></sup>\ <sup>Bug Fix Release</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.1.58166/sonar-scanner-msbuild-5.9.1.58166-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.1.58166/sonar-scanner-msbuild-5.9.1.58166-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.1.58166/sonar-scanner-msbuild-5.9.1.58166-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.1.58166/sonar-scanner-msbuild-5.9.1.58166-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.9.1.58166)

***

**5.9.0** <sup><sub>**2022-12-01**<sub></sup>\ <sup>.NET 7 bug fixes and preparation for fast PR analysis</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.0.57893/sonar-scanner-msbuild-5.9.0.57893-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.0.57893/sonar-scanner-msbuild-5.9.0.57893-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.0.57893/sonar-scanner-msbuild-5.9.0.57893-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.9.0.57893/sonar-scanner-msbuild-5.9.0.57893-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.9.0.57893)

***

**5.8.0** <sup><sub>**2022-08-24**<sub></sup>\ <sup>Analysis of Azure Functions on Github Actions no longer hard fails with default behavior. See release notes for details.</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.8.0.52797/sonar-scanner-msbuild-5.8.0.52797-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.8.0.52797/sonar-scanner-msbuild-5.8.0.52797-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.8.0.52797/sonar-scanner-msbuild-5.8.0.52797-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.8.0.52797/sonar-scanner-msbuild-5.8.0.52797-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.8.0.52797)

***

**5.7.2** <sup><sub>**2022-07-12**<sub></sup>\ <sup>Log warning instead of error when not parsing environment variables to avoid hard failure when Newtonsoft does not get resolved</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.2.50892/sonar-scanner-msbuild-5.7.2.50892-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.2.50892/sonar-scanner-msbuild-5.7.2.50892-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.2.50892/sonar-scanner-msbuild-5.7.2.50892-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.2.50892/sonar-scanner-msbuild-5.7.2.50892-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.7.2.50892)

***

**5.7.1** <sup><sub>**2022-06-21**<sub></sup>\ <sup>Bug Fix Release</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.1.49528/sonar-scanner-msbuild-5.7.1.49528-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.1.49528/sonar-scanner-msbuild-5.7.1.49528-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.1.49528/sonar-scanner-msbuild-5.7.1.49528-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.1.49528/sonar-scanner-msbuild-5.7.1.49528-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.7.1.49528)

***

**5.7.0** <sup><sub>**2022-06-20**<sub></sup>\ <sup>Bug Fix Release</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.0.49456/sonar-scanner-msbuild-5.7.0.49456-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.0.49456/sonar-scanner-msbuild-5.7.0.49456-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.0.49456/sonar-scanner-msbuild-5.7.0.49456-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.7.0.49456/sonar-scanner-msbuild-5.7.0.49456-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.7.0.49456)

***

**5.6.0** <sup><sub>**2022-05-30**<sub></sup>\ <sup>Send warnings to users of versions where support will change</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.6.0.48455/sonar-scanner-msbuild-5.6.0.48455-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 3.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.6.0.48455/sonar-scanner-msbuild-5.6.0.48455-netcoreapp3.0.zip) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.6.0.48455/sonar-scanner-msbuild-5.6.0.48455-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.6.0.48455/sonar-scanner-msbuild-5.6.0.48455-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.6.0.48455)

***

**5.5.3** <sup><sub>**2022-02-14**<sub></sup>\ <sup>Support for .NET 6 Web Projects, TLS Version selection logic removed - now responsibility of OS, Fix "MSB3677 Unable to move file" regression</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.3.43281/sonar-scanner-msbuild-5.5.3.43281-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.3.43281/sonar-scanner-msbuild-5.5.3.43281-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.3.43281/sonar-scanner-msbuild-5.5.3.43281-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.5.3.43281)

***

**5.5.2** <sup><sub>**2022-02-10**<sub></sup>\ <sup>Support for .NET 6 Web Projects, TLS Version selection logic removed, now responsibility of OS</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.2.43124/sonar-scanner-msbuild-5.5.2.43124-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.2.43124/sonar-scanner-msbuild-5.5.2.43124-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.2.43124/sonar-scanner-msbuild-5.5.2.43124-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.5.2.43124)

***

**5.5.1** <sup><sub>**2022-02-08**<sub></sup>\ <sup>Support for .NET 6 Web Projects, support TLS 1.3 where supported by environment</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.1.42999/sonar-scanner-msbuild-5.5.1.42999-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.1.42999/sonar-scanner-msbuild-5.5.1.42999-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.1.42999/sonar-scanner-msbuild-5.5.1.42999-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.5.1.42999)

***

**5.5.0** <sup><sub>**2022-02-07**<sub></sup>\ <sup>Support for .NET 6 Web Projects, support TLS 1.3</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.0.42949/sonar-scanner-msbuild-5.5.0.42949-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.0.42949/sonar-scanner-msbuild-5.5.0.42949-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.5.0.42949/sonar-scanner-msbuild-5.5.0.42949-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.5.0.42949)

***

**5.4.1** <sup><sub>**2021-12-23**<sub></sup>\ <sup>Updated Newtonsoft.Json to latest</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.4.1.41282/sonar-scanner-msbuild-5.4.1.41282-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.4.1.41282/sonar-scanner-msbuild-5.4.1.41282-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.4.1.41282/sonar-scanner-msbuild-5.4.1.41282-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.4.1.41282)

***

**5.4** <sup><sub>**2021-11-26**<sub></sup>\ <sup>Updated .NET 5 Version to be forward compatible and support .NET 6 environments</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.4.0.40033/sonar-scanner-msbuild-5.4.0.40033-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.4.0.40033/sonar-scanner-msbuild-5.4.0.40033-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.4.0.40033/sonar-scanner-msbuild-5.4.0.40033-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.4.0.40033)

***

**5.3.2** <sup><sub>**2021-10-28**<sub></sup>\ <sup>Added parameters sonar.clientcert.path and sonar.clientcert.password for securing connections to SonarQube</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.3.2.38712/sonar-scanner-msbuild-5.3.2.38712-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.3.2.38712/sonar-scanner-msbuild-5.3.2.38712-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.3.2.38712/sonar-scanner-msbuild-5.3.2.38712-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.3.2.38712)

***

**5.3.1** <sup><sub>**2021-09-01**<sub></sup>\ <sup>Update scanner-cli, Compile with .NET Core 2.1 and 3.1, Improve uninstall of targets if multiple builds in the same pipeline</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.3.1.36242/sonar-scanner-msbuild-5.3.1.36242-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.3.1.36242/sonar-scanner-msbuild-5.3.1.36242-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.3.1.36242/sonar-scanner-msbuild-5.3.1.36242-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.3.1.36242)

***

**5.2.2** <sup><sub>**2021-06-24**<sub></sup>\ <sup>Fix test assembly detection + mTLS certificate with password</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.2.33595/sonar-scanner-msbuild-5.2.2.33595-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.2.33595/sonar-scanner-msbuild-5.2.2.33595-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.2.33595/sonar-scanner-msbuild-5.2.2.33595-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.2.2.33595)

***

**5.2.1** <sup><sub>**2021-04-30**<sub></sup>\ <sup>Update embedded SonarScanner CLI</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.1.31210/sonar-scanner-msbuild-5.2.1.31210-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.1.31210/sonar-scanner-msbuild-5.2.1.31210-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.1.31210/sonar-scanner-msbuild-5.2.1.31210-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.2.1.31210)

***

**5.2** <sup><sub>**2021-04-09**<sub></sup>\ <sup>Support for test code analysis</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.0.29862/sonar-scanner-msbuild-5.2.0.29862-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.0.29862/sonar-scanner-msbuild-5.2.0.29862-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.2.0.29862/sonar-scanner-msbuild-5.2.0.29862-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.2.0.29862)

***

**5.1** <sup><sub>**2021-03-09**<sub></sup>\ <sup>Support for .NET 5, support for solo .NET Core project (without .sln)</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.1.0.28487/sonar-scanner-msbuild-5.1.0.28487-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.1.0.28487/sonar-scanner-msbuild-5.1.0.28487-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.1.0.28487/sonar-scanner-msbuild-5.1.0.28487-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.1.0.28487)

***

**5.0.4** <sup><sub>**2020-11-11**<sub></sup>\ <sup>Support for .NET 5, support for solo .NET Core project (without .sln)</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.0.4.24009/sonar-scanner-msbuild-5.0.4.24009-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.0.4.24009/sonar-scanner-msbuild-5.0.4.24009-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.0.4.24009/sonar-scanner-msbuild-5.0.4.24009-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.0.4.24009)

***

**5.0.3** <sup><sub>**2020-11-10**<sub></sup>\ <sup>Support for .NET 5, support for solo .NET Core project (without .sln)</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.0.3.23901/sonar-scanner-msbuild-5.0.3.23901-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.0.3.23901/sonar-scanner-msbuild-5.0.3.23901-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.0.3.23901/sonar-scanner-msbuild-5.0.3.23901-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.0.3.23901)

***

**5.0** <sup><sub>**2020-11-05**<sub></sup>\ <sup>Support for .NET 5, support for solo .NET Core project (without .sln)</sup>\
Download scanner for: [.NET 5+](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.0.0.23533/sonar-scanner-msbuild-5.0.0.23533-net5.0.zip) [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.0.0.23533/sonar-scanner-msbuild-5.0.0.23533-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/5.0.0.23533/sonar-scanner-msbuild-5.0.0.23533-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/5.0.0.23533)

***

**4.10** <sup><sub>**2020-06-29**<sub></sup>\ <sup>Support FIPS compliant cryptographic algorithm</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/4.10.0.19059/sonar-scanner-msbuild-4.10.0.19059-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/4.10.0.19059/sonar-scanner-msbuild-4.10.0.19059-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/4.10.0.19059)

***

**4.9** <sup><sub>**2020-05-05**<sub></sup>\ <sup>Improve detection of duplicated coverage reports, fix categorization of fakes projects</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/4.9.0.17385/sonar-scanner-msbuild-4.9.0.17385-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/4.9.0.17385/sonar-scanner-msbuild-4.9.0.17385-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/4.9.0.17385)

***

**4.8** <sup><sub>**2019-11-06**<sub></sup>\ <sup>Enable scanner execution when only .NET Core 3 is installed</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/4.8.0.12008/sonar-scanner-msbuild-4.8.0.12008-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/4.8.0.12008/sonar-scanner-msbuild-4.8.0.12008-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/4.8.0.12008)

***

**4.7.1** <sup><sub>**2019-09-10**<sub></sup>\ <sup>Update SonarScanner to version 4.1</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/4.7.1.2311/sonar-scanner-msbuild-4.7.1.2311-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/4.7.1.2311/sonar-scanner-msbuild-4.7.1.2311-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/4.7.1.2311)

***

**4.7** <sup><sub>**2019-09-03**<sub></sup>\ <sup>Support dash and forward-slash in dotnet command line arguments, analyze XAML files, add analyzed targets in logs</sup>\
Download scanner for: [.NET Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) [.NET Core 2.1](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/4.7.0.2295/sonar-scanner-msbuild-4.7.0.2295-netcoreapp2.0.zip) [.NET Framework 4.6](https://github.com/SonarSource/sonar-scanner-msbuild/releases/download/4.7.0.2295/sonar-scanner-msbuild-4.7.0.2295-net46.zip)\
\
[Release notes](https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/4.7.0.2295)

</details>

{% hint style="info" %}
Beginning with the Sonar Scanner for .NET v8, the way the `sonar.projectBaseDir` property is automatically detected has changed which has an impact on the files that are analyzed and how relative properties, such as `sonar.exclusions` and `sonar.test.exclusions`, are resolved.

To customize the behavior, you can set the `sonar.projectBaseDir` property to point to a directory that contains all the source code you want to analyze. The path may be relative (to the directory from which the analysis was started) or absolute.
{% endhint %}

The SonarScanner for .NET is the recommended way to launch an analysis for projects built using `MSBuild` or `dotnet`. It is the result of a collaboration between SonarSource and Microsoft.

The SonarScanner for .NET is distributed as a [.NET Core Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner), in the [sonarqube-extension-for-azure-devops](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/scanners/sonarqube-extension-for-azure-devops "mention"), and and in the Sonar [jenkins-extension-sonarqube](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/scanners/jenkins-extension-sonarqube "mention").

It supports .NET Core on every platform (Windows, macOS, Linux).

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* SonarQube 10.4 requires the SonarScanner for .NET 5.14+.
* From version 7.0, Java is no longer required because the scanner will download it automatically.
  * If internet access is limited in your configuration, skip the JRE provisioning and use the Java version installed locally.
  * If you are running a previous version of the scanner you will need at least the minimal version of Java supported by your SonarQube server.
* The SDK corresponding to your build system:
  * If you are using the .NET Framework version of the scanner you will need [.NET Framework v4.6.2 or above](https://dotnet.microsoft.com/en-us/download/dotnet-framework). For commercial versions of SonarQube to benefit from security analysis you will need [.NET Framework v4.7.2 or above](https://dotnet.microsoft.com/en-us/download/dotnet-framework)
  * If you are using the .NET version of the scanner or the [.NET Core Global Tool](https://www.nuget.org/packages/dotnet-sonarscanner) you will need [.NET Core SDK 3.1 or above](https://dotnet.microsoft.com/en-us/download/dotnet)
* The minimum supported version for SonarQube is now 8.9. *We recommend that you upgrade to the 9.9 LTA (or newer) because support for older versions will end in January 2025.*
  * The scanner will fail to start if an older version of SonarQube is detected.

{% hint style="info" %}
The flavor used to compile the Scanner for .NET (either .NET Framework, .NET Core or .NET) is independent of the .NET version the project you want to analyze has been built with. Concretely, you can analyze .NET Core code with the .NET Framework version of the Scanner. It’s only relevant depending on your OS, and on the versions of .NET SDKs that are installed on your build machine.
{% endhint %}

## Installation <a href="#iinstallation" id="iinstallation"></a>

### .NET Core global tool <a href="#net-core-global-tool" id="net-core-global-tool"></a>

```css-79elbk
dotnet tool install --global dotnet-sonarscanner --version x.x.x
```

The `--version` argument is optional. If it is omitted the latest version will be installed. The full list of releases is available on the [NuGet page](https://www.nuget.org/packages/dotnet-sonarscanner).

.NET Core Global Tool is available from .NET Core 3.1+.

### Standalone executable <a href="#standalone-executable" id="standalone-executable"></a>

* Expand the downloaded file into the directory of your choice. We’ll refer to it as `<INSTALL_DIRECTORY>` in the next steps.
  * On Windows, you might need to unblock the ZIP file first (right-click **file** > **Properties** > **Unblock**).
  * On Linux/OSX you may need to set execute permissions on the files in `<INSTALL_DIRECTORY>/sonar-scanner-(version)/bin`.
* Uncomment, and update the global settings to point to your SonarQube server by editing `<INSTALL_DIRECTORY>/SonarQube.Analysis.xml`. Values set in this file will be applied to all analyses of all projects unless overwritten locally.\
  Consider setting file system permissions to restrict access to this file.

```css-79elbk
<SonarQubeAnalysisProperties  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sonarsource.com/msbuild/integration/2015/1">
  <Property Name="sonar.host.url">http://localhost:9000</Property>
  <Property Name="sonar.token">[my-user-token]</Property>
</SonarQubeAnalysisProperties>
```

* Add `<INSTALL_DIRECTORY>` to your `PATH` environment variable.

### If your SonarQube server is secured <a href="#if-your-sonarqube-server-is-secured" id="if-your-sonarqube-server-is-secured"></a>

If your SonarQube server is [#securing-the-server-behind-a-proxy](https://docs.sonarsource.com/sonarqube-server/10.6/setup-and-upgrade/configure-and-operate-a-server/operating-the-server#securing-the-server-behind-a-proxy "mention") and a self-signed certificate then you must add the self-signed certificate to the trusted CA certificates of the SonarScanner. In addition, if mutual TLS is used then you must define the access to the client certificate at the SonarScanner level.

See [manage-tls-certificates](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/various-setups/manage-tls-certificates "mention").

{% hint style="warning" %}
[#jre-autoprovisioning](https://docs.sonarsource.com/sonarqube-server/10.6/analysis-parameters#jre-autoprovisioning "mention") should be disabled when using a secured SonarQube server. The SonarScanner for .NET version 7.0 and newer will try to download Java automatically and will break the analysis if it can’t. Use these parameters to skip auto-provisioning and use the Java version installed locally, instead:

* `/d:sonar.scanner.skipJreProvisioning=true`
* `/d:sonar.scanner.javaExePath=<PATH>`
  {% endhint %}

## Use <a href="#use" id="use"></a>

{% hint style="info" %}
You can invoke the Scanner using arguments with both dash (`-`) or forward-slash (`/`) separators. Either of the following will work:

* `SonarScanner.MSBuild.exe begin /k:"project-key"`
* `SonarScanner.MSBuild.exe begin -k:"project-key"`
  {% endhint %}

There are two versions of the SonarScanner for .NET. In the following commands, you need to pass an [generating-and-using-tokens](https://docs.sonarsource.com/sonarqube-server/10.6/user-guide/user-account/generating-and-using-tokens "mention") using the `sonar.token` property. In addition, the default URL points to a SonarCloud path therefore, you must also direct the invocation to your `/d:sonar.host.url`.

Any project file accepted by MSBuild.exe or dotnet can be used, for example `.sln`, `.proj`, `.csproj`, or `.vbproj`.

### "Classic" .NET framework invocation <a href="#classic-net-framework-invocation" id="classic-net-framework-invocation"></a>

The first version is based on the "classic" .NET Framework. To use it, execute the following commands from the root folder of your project:

```css-79elbk
SonarScanner.MSBuild.exe begin /k:"project-key" /d:sonar.token="<token>" /d:sonar.host.url="http://localhost:9000"
MSBuild.exe <path to project file or .sln file> /t:Rebuild
SonarScanner.MSBuild.exe end /d:sonar.token="<token>"
```

### .NET Core and .NET Core global tool invocation <a href="#net-core-and-net-core-global-tool-invocation" id="net-core-and-net-core-global-tool-invocation"></a>

The second version is based on .NET Core which has a very similar usage:

```css-79elbk
dotnet <path to SonarScanner.MSBuild.dll> begin /k:"project-key" /d:sonar.token="<token>" /d:sonar.host.url="http://localhost:9000"
dotnet build <path to project file or .sln file> --no-incremental
dotnet <path to SonarScanner.MSBuild.dll> end /d:sonar.token="<token>"
```

The .NET Core version can also be used as a .NET Core Global Tool. After installing the Scanner as a global tool as described above it can be invoked as follows:

```css-79elbk
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /k:"project-key" /d:sonar.token="<token>" /d:sonar.host.url="http://localhost:9000"
dotnet build <path to project file or .sln file> --no-incremental
dotnet sonarscanner end /d:sonar.token="<token>"
```

In summary, the invocation of the SonarScanner for .NET will depend on the scanner flavor you want to use:

| **Scanner Flavor**    | **Invocation**                                   |
| --------------------- | ------------------------------------------------ |
| .NET Core Global Tool | `dotnet sonarscanner begin` etc.                 |
| .NET Core 3.1+        | `dotnet <path to SonarScanner.MSBuild.dll>` etc. |
| .NET Framework 4.6.2+ | `SonarScanner.MSBuild.exe begin` etc.            |

**Notes:**

* The .NET Core version of the scanner does not support TFS XAML builds and automatic finding/conversion of Code Coverage files. Apart from that, all versions of the Scanner have the same capabilities and command line arguments.

{% hint style="info" %}
The SonarScanners run on code that is checked out. See [verifying-code-checkout-step](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/various-setups/verifying-code-checkout-step "mention").
{% endhint %}

## Analysis steps <a href="#analysis-steps" id="analysis-steps"></a>

The construction of your pipeline will be slightly different according to your DevOps platform integration. Please see the appropriate pages for your platform:

{% tabs %}
{% tab title="GITHUB" %}
See the [introduction](https://docs.sonarsource.com/sonarqube-server/10.6/devops-platform-integration/github-integration/introduction "mention") page.
{% endtab %}

{% tab title="BITBUCKET CLOUD" %}
See the [bitbucket-cloud-integration](https://docs.sonarsource.com/sonarqube-server/10.6/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration "mention") page.
{% endtab %}

{% tab title="GITLAB" %}
See the [introduction](https://docs.sonarsource.com/sonarqube-server/10.6/devops-platform-integration/gitlab-integration/introduction "mention") page.
{% endtab %}

{% tab title="AZURE DEVOPS" %}
See the [azure-devops-integration](https://docs.sonarsource.com/sonarqube-server/10.6/devops-platform-integration/azure-devops-integration "mention") page.
{% endtab %}
{% endtabs %}

### Begin <a href="#begin" id="begin"></a>

The begin step is executed when you add the `begin` command line argument. It hooks into the build pipeline, downloads SonarQube quality profiles and settings, and prepares your project for analysis.

**Begin step command line parameters**

* `/k:<project-key>`
  * **\[required]** Specifies the key of the analyzed project in SonarQube
* `/n:<project name>`
  * **\[optional]** Specifies the name of the analyzed project in SonarQube.
  * Adding this argument will overwrite the project name in SonarQube if it already exists.
* `/v:<version>`
  * **\[recommended]** Specifies the version of your project.
* `/d:sonar.token=<token>`
  * **\[recommended]** Requires version 5.13+. Use `sonar.login` for earlier versions.
  * Specifies the [Generating and using tokens](https://app.gitbook.com/s/wuQmJTVPOsx7zNT5Aqwl/user-guide/user-account/generating-and-using-tokens "mention") used to authenticate with SonarQube. If this argument is added to the Begin step, it must also be added to the End step.
* `/d:sonar.clientcert.path=<ClientCertificatePath>`
  * **\[optional]** Specifies the path to a client certificate used to access SonarQube [manage-tls-certificates](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/various-setups/manage-tls-certificates "mention"). The certificate must be password protected.
* `/d:sonar.clientcert.password=<ClientCertificatePassword>`
  * **\[optional]** Specifies the password for the client certificate used to access SonarQube [manage-tls-certificates](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/various-setups/manage-tls-certificates "mention"). If this argument is added to the Begin step, it must also be added to the End step.
* `/d:sonar.verbose=true`
  * **\[optional]** Sets the logging verbosity to detailed. Add this argument before sending logs for troubleshooting.
* `/d:sonar.dotnet.excludeTestProjects=true`
  * **\[optional]** Excludes Test Projects from analysis. Add this argument to improve build performance when issues should not be detected in Test Projects.
* `/d:sonar.http.timeout=60`
  * **\[optional]** Specifies the time in seconds to wait before the HTTP requests time out.
* `/d:<analysis-parameter>=<value>`
  * **\[optional]** Specifies an additional SonarQube [analysis-parameters](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/analysis-parameters "mention"), you can add this argument multiple times. Please note that the `sonar.sources` and `sonar.tests` parameters are not supported.
* `/s:<custom.analysis.xml>`
  * **\[optional]** Overrides the `$install_directory/SonarQube.Analysis.xml`. You need to give the absolute path to the file.
* `/d:sonar.plugin.cache.directory=<path_to_directory>`
  * **\[optional]** Requires version 5.15+. Overrides the path where the scanner downloads its plugins. Plugins that are already present will not be downloaded again, unless newer versions are available.
  * You can provide a relative or an absolute path.
  * Defaults to the machine’s temporary files directory.
* `/d:sonar.scanner.scanAll=true`
  * **\[optional]** Enables and Disables the analysis of multiple file types. See the Multi-language support article for the full details. Unless manually excluded, the files linked by the `.csproj` project file will be analyzed even if the value is false.
  * **Default**: true

For detailed information about all available parameters, see the [analysis-parameters](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/analysis-parameters "mention") page.

{% hint style="warning" %}
The "begin" step will modify your build like this:

* the active `CodeAnalysisRuleSet` will be updated to match the SonarQube quality profile
* `WarningsAsErrors` will be turned off

If your build process cannot tolerate these changes we recommend creating a second build job for SonarQube analysis.
{% endhint %}

### Build <a href="#build" id="build"></a>

Between the `begin` and `end` steps, you need to build your project, execute tests, and generate code coverage data. This part is specific to your needs and it is not detailed here. See [dotnet-test-coverage](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/test-coverage/dotnet-test-coverage "mention") for more information.

The rules configured in your [quality-profiles](https://docs.sonarsource.com/sonarqube-server/10.6/instance-administration/quality-profiles "mention") are run during the build, and it is expected that analyzing with SonarQube can increase build duration from 4 to 8 times. The impact on duration will vary by project and by what rules are enabled; some rules are simple to execute and others take additional time to have the impact and precision expected of them.

### End <a href="#end" id="end"></a>

The end step is executed when you add the "end" command line argument. It cleans the `MSBuild/dotnet` build hooks, collects the analysis data generated by the build, the test results, and the code coverage, and then uploads everything to SonarQube. There are only two additional arguments that are allowed for the end step.

**End step command line parameters**

* `/d:sonar.token=<token>`
  * This argument is required if it was added to the begin step.
* `/d:sonar.clientcert.password=<ClientCertificatePassword>`
  * This argument is required if it was added to the begin step. Specifies the password for the client certificate used to access SonarQube [manage-tls-certificates](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/various-setups/manage-tls-certificates "mention").

### Known limitations <a href="#known-limitations" id="known-limitations"></a>

* MSBuild versions 14 and older are not supported. MSBuild 15 is deprecated and support will be removed in a future version. We recommend using MSBuild 16 as a minimal version.
* Web Application projects are supported. Legacy Web Site projects are not.
* Projects targeting multiple frameworks and using preprocessor directives could have slightly inaccurate metrics (lines of code, complexity, etc.) because the metrics are calculated only from the first of the built targets.

## Code coverage <a href="#code-coverage" id="code-coverage"></a>

In an Azure DevOps / TFS environment, test files are automatically retrieved as follows:

* A search is done for *.trx* files in any `TestResults` folder located under `$Build.SourcesDirectory`.
* If no .trx files are found there, then a fallback search is performed under `$Agent.TempDirectory`.

Once the *.trx* files have been found, their *.coverage* counterparts are retrieved and converted to *.coveragexml* files for upload to SonarCloud.

As stated above, this will work only with the .NET Framework version of the scanner.

See [dotnet-test-coverage](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/test-coverage/dotnet-test-coverage "mention") for more information.

## Excluding projects from analysis <a href="#excluding-projects" id="excluding-projects"></a>

Some project types, such as [Microsoft Fakes](https://msdn.microsoft.com/en-us/library/hh549175.aspx), are automatically excluded from analysis. To manually exclude a different type of project from the analysis, place the following in its .xxproj file.

```css-79elbk
<!-- in .csproj –->
<PropertyGroup>
  <!-- Exclude the project from analysis -->
  <SonarQubeExclude>true</SonarQubeExclude>
</PropertyGroup>
```

## Advanced topics <a href="#advanced-topics" id="advanced-topics"></a>

**Analyzing MSBuild 12, 14, and 15 projects with MSBuild 16**

The Sonar Scanner for .NET requires your project to be built with MSBuild 16. We recommend installing Visual Studio 2022 or later on the analysis machine in order to benefit from the integration and features provided with the Visual Studio ecosystem (VSTest, MSTest unit tests, etc.).

Projects targeting older versions of the .NET Framework can be built using MSBuild 16 by setting the "TargetFrameworkVersion" MSBuild property as documented by Microsoft:

* [How to: Target a Version of the .NET Framework](https://msdn.microsoft.com/en-us/library/bb398202.aspx)
* [MSBuild Target Framework and Target Platform](https://msdn.microsoft.com/en-us/library/hh264221.aspx)

For example, if you want to build a .NET 3.5 project, but you are using a newer MSBuild version:

```css-79elbk
MSBuild.exe /t:Rebuild /p:TargetFramework=net35
```

If you do not want to switch your production build to MSBuild 16, you can set up a separate build dedicated to the SonarQube analysis.

**Detection of test projects**

You can read a full description of that subject on our wiki [here](https://github.com/SonarSource/sonar-scanner-msbuild/wiki/Analysis-of-product-projects-vs.-test-projects).

**Per-project analysis parameters**

Some analysis parameters can be set for a single MSBuild project by adding them to its .csproj file.

```css-79elbk
<!-- in .csproj -->
<ItemGroup>
  <SonarQubeSetting Include="sonar.stylecop.projectFilePath">
    <Value>$(MSBuildProjectFullPath)</Value>
  </SonarQubeSetting>
</ItemGroup>
```

### Analyzing languages other than C# and VB <a href="#analyzing-languages-other-than-c-and-vb" id="analyzing-languages-other-than-c-and-vb"></a>

For newer SDK-style projects used by .NET Core, .NET 5, and later, the SonarScanner for .NET will analyze all file types that are supported by the project type (for example, `esproj`), MSBuild, and the available language plugins unless explicitly excluded. As described in the Multi-language article below, some file types are automatically included in the SonarScanner for .NET v8.0 and newer.

If you have an `esproj` project type, make sure to use [Microsoft.VisualStudio.JavaScript.SDK](https://www.nuget.org/packages/Microsoft.VisualStudio.JavaScript.SDK) version 0.5.74-alpha or later to ensure the SonarScanner for .NET recognizes the esproj contents for scanning.

For older-style projects, the scanner will only analyze files that are listed in the `.csproj` or `.vbproj` project file. Normally this means that only C# and VB files will be analyzed. To enable the analysis of other types of files, include them in the project file.

Even if you disable multi-file analysis (see below), any files included by an element of the `ItemTypes` in [this list](https://github.com/SonarSource/sonar-scanner-msbuild/blob/5.14.0.78575/src/SonarScanner.MSBuild.Tasks/Targets/SonarQube.Integration.targets#L109) will be analyzed automatically. For example, the following line in your .csproj or .vbproj file will enable the analysis of all JavaScript files in the directory foobecause the content is one of the `ItemTypes` that are automatically analyzed.

```css-79elbk
<Content Include="foo\bar\*.js" />
```

Additionally, `<Compilation Remove="FileName.ext"/>` and `<None Remove="FileName.ext"/>` attributes in .NET project files (either .csproj or .vbproj) work differently depending on the file type and if the `sonar.scanner.scanAll property` (the multi-language analysis feature) is enabled or not.

* C# and VB.NET files will not be analyzed since they are not part of the compilation, and therefore the Roslyn analyzers will not run on them.
* When the multi-language analysis feature is enabled, additional language file types (such as JavaScript, TypeScript, SQL, etc.) are added to the scope and will be analyzed. To ignore specific language file types, we recommend that you use the `sonar.exclusions` property. See the **Multi-language analysis** article (below) for a list of file types automatically picked up by the scanner.

You can also add `ItemTypes` to the default list by following [these directions](https://github.com/SonarSource/sonar-scanner-msbuild/blob/5.14.0.78575/src/SonarScanner.MSBuild.Tasks/Targets/SonarQube.Integration.targets#L70).

You can check which files the scanner will analyze by looking in the file .sonarqube-project.properties after MSBuild has finished.

File type extensions can be manually excluded from the analysis using `sonar.exclusions`. See the **File exclusion and inclusion** article on the [analysis-scope](https://docs.sonarsource.com/sonarqube-server/10.6/project-administration/analysis-scope "mention") page for more details.

### Using SonarScanner for .NET with a proxy <a href="#using-sonarscanner-for-net-with-a-proxy" id="using-sonarscanner-for-net-with-a-proxy"></a>

On build machines that connect to the Internet through a proxy server you might experience difficulties connecting to SonarQube. To instruct the Java VM to use specific proxy settings use the following value:

```css-79elbk
SONAR_SCANNER_OPTS = "-Dhttp.proxyHost=yourProxyHost -Dhttp.proxyPort=yourProxyPort"
```

Where *yourProxyHost* and *yourProxyPort* are the hostname and the port of your proxy server. There are additional proxy settings for HTTPS, authentication and exclusions that could be passed to the Java VM. For more information, see the following article: <https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html>.

You also need to set the appropriate proxy environment variables used by .NET. `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, and `NO_PROXY` are all supported. You can find more details [here](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.defaultproxy?view=net-5.0).

**Multi-language analysis**

The SonarScanner for .NET (starting from v8.0) automatically analyzes these languages using the `sonar.scanner.scanAll` parameter. These file types are automatically picked up by the scanner:

* CSS (.css,.less,.scss,.sass)
* HTML (.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm, .shtml,.cmp,.twig)
* Javascript (.js,.jsx,.cjs,.mjs,.vue). See the [javascript-typescript-test-coverage](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/test-coverage/javascript-typescript-test-coverage "mention") page for details to adjust your setup.
* JSON (.json)
* PLSQL (.sql,.pks,.pkb)
* SQL (.tsql)
* TypeScript (.ts,.tsx,.cts,.mts). See the [javascript-typescript-test-coverage](https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/test-coverage/javascript-typescript-test-coverage "mention") page for details to adjust your setup.
* YAML (.yaml,.yml)

File type extensions can be found and configured in the SonarQube UI; see the [Setting the scope by file type](https://docs.sonarsource.com/sonarqube/10.6/project-administration/analysis-scope/#scope-by-file-type) article for more details. Additionally, file types can be manually excluded from the analysis using `sonar.exclusions`. See the [Wildcard patterns](https://docs.sonarsource.com/sonarqube/10.6/project-administration/analysis-scope/#wildcard-patterns) article on the Analysis scope page for a list of patterns and examples.

Unless manually excluded, the files linked by the `.csproj` project file will be analyzed even if the value is false.

{% hint style="info" %}
Multi-Language analysis is enabled by default. If this was not intended and you have issues such as hitting your LOC limit or analyzing unwanted files, you can set `/d:sonar.scanner.scanAll=false` in the Begin step to *turn off multi-language analysis*.
{% endhint %}

## Known issues <a href="#known-issues" id="known-issues"></a>

**I have multiple builds in the same pipeline, each of them getting analyzed even if the Run Code Analysis has already been executed:**

The scanner doesn’t uninstall the global `ImportBefore` targets to support concurrent analyses on the same machine. The main effect is that if you build a solution where a .sonarqube folder is located nearby, then the `sonar-dotnet` analyzer will be executed along with your build task.

To avoid that, you can disable the targets file by adding a build parameter:

```css-79elbk
msbuild /p:SonarQubeTargetsImported=true
dotnet build -p:SonarQubeTargetsImported=true
```

**Excluding files in certain directories**

[It is known](https://github.com/SonarSource/sonar-dotnet/issues/6328) that the SonarScanner for .NET can’t filter the excluded files/folders from the analysis, which happens during the build. The `sonar.exclusions` property is only used to filter issues sent to SonarQube during the end step.

As a workaround, you can try to add an `.editorconfig` file in your `Migrations` folder to override the severity of the Sonar rules:

```css-79elbk
[*.cs]
dotnet_diagnostic.S1118.severity = none
```

Unfortunately, you may have to manually do this for every rule.
