Hi,
I am using the following code:
- task: SonarQubePrepare@4
condition: eq(variables['Build.SourceBranchName'], 'master')
inputs:
SonarQube: 'SonarQube-Services-Demo'
scannerMode: 'MSBuild'
configMode: 'manual'
projectKey: 'SONAR-DEMO'
extraProperties: |
sonar.cs.vstest.reportsPaths=$(Agent.TempDirectory)\**\*.trx
sonar.cs.vscoveragexml.reportsPaths=$(Agent.TempDirectory)\**\*.coveragexml
- task: DotNetCoreCLI@2
condition: eq(variables['Build.SourceBranchName'], 'master')
displayName: "SonarQube Collect Code Coverage"
inputs:
command: 'test'
arguments: '--collect "Code Coverage"'
On run, an error is recorded:
/usr/bin/dotnet test --logger trx --results-directory /azp/agent/_work/_temp --collect Code Coverage
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
##[debug]Exit code 1 received from tool '/usr/bin/dotnet'
##[debug]STDIO streams have closed for tool '/usr/bin/dotnet'
##[error]Error: The process '/usr/bin/dotnet' failed with exit code 1
I use azure do the directory the information was pulled and compiled is a working directory:
/azp/agent/_work/10/s/source
How can i get Sonar to run the dotnet test in this folder?
Thanks