Hi Team,
I’ve multiple builds in the same pipeline(TeamCity). I’m getting below error while scanning
Scanner Version is 4.8 & SonarQube version is 9.2.4
[11:53:23]Cannot copy a different version of the SonarScanner for MSBuild assemblies because they are used by a running MSBuild/.Net Core process. To resolve this problem try one of the following:
[11:53:23]- Analyze this project using the same version of SonarScanner for MSBuild
[11:53:23]- Build your project with the ‘/nr:false’ switch
[11:53:23]Pre-processing failed. Exit code: 1
[11:53:23]Process exited with code 1
I’ve passed /p:SonarQubeTargetsImported=true to avoid this error, but now I’m getting
[11:57:41]11:57:41.032 11:57:41.029 Unrecognized command line argument: /p:SonarQubeTargetsImported=true
[11:57:41]11:57:41.032 Expecting at least the following command line argument:
[11:57:41]- SonarQube project key
[11:57:41]When connecting to a SonarQube server earlier than version 6.1, the following command line arguments are also required:
[11:57:41]- SonarQube project name
[11:57:41]- SonarQube project version
[11:57:41]The full path to a settings file can also be supplied. If it is not supplied, the exe will attempt to locate a default settings file in the same directory as the SonarQube Scanner for MSBuild.
[11:57:41]Use ‘/?’ or ‘/h’ to see the help message.
[11:57:41]11:57:41.034 Pre-processing failed. Exit code: 1
[11:57:41]Process exited with code 1