Failed to scan Dot Net Project

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
  • steps to reproduce
  • potential workaround

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

Edition - Edition

When I am using -

scannerMode: ‘CLI’
configMode: manual cliProjectKey: ‘${{ parameters.project_name }}’

Pipeline is running properly. But dot net project is not analyzing since we are not using MS Build.

But when I am using -

 scannerMode: 'MSBuild'
projectKey: 'YourProjectKey'

I am getting the following error -

##[error]Unhandled Exception: ##[error]System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. —> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

Please help me here.

Hi @Top_Bong

Scanner for .NET uses .NET technologies to issue some API calls against your SonarQube instance.

If you’re not using self-signed certificate, you’ll need to install your SQ certificate (along with the whole cert chain if required) in your machine’s cert store.


I have already added the certificates in java path

Even after adding the certificate, I am getting this issue.

Are you hosting/running the build agent yourself ? You should add it to the linux/MS Cert store depending on your host, not the java one (at least for this part of the build.)