Closed rs200x closed 5 years ago
Sonar Qube is not Support backslashes in Settings, please use forewardslashes they will be automatically changed during usage.
I don't believe that this is the cause.
I can't define only foreward slashes as I'm using TFS configuration variables.
Anyway, as you can see in the log, the value of the sonar.cs.fxcop.slnFile parameter is taken.
It's trying to run the analysis solution starting with the common project which is the very first in the build order. Its just expecting the assemblies at the wrong place, because its not recognizing that the solution was build with /p:OutDir="D:\TfsAgent_work\6\s\Output\Debug".
Can you try to create a Log with verbose logging?
I tried to get some data with sonar.verbose=true Unfortunately I can't pass the -X parameter through via the TFS SonarQube Task. sonaranalysis.zip
Please check with /d:sonar.cs.fxcop.directories="D:\TfsAgent_work\6\s\Output\Debug" instead of /d:sonar.cs.fxcop.directory="D:\TfsAgent_work\6\s\Output\Debug"
no, doesn't help
can I expect some more help or another solution?
Please give a new log after you changed to /d:sonar.cs.fxcop.directories="D:\TfsAgent_work\6\s\Output\Debug" is the folder in line ERROR: Servus.Common.dll was not found in any output directory ...
sorry for the long delay, I had to wait for a new SQ license.
I tried with what you proposed, buts still failing
2019-01-11T20:10:01.0355938Z ##[debug]/d:sonar.cs.vstest.reportsPaths="D:\TfsAgent\_work\11\TestResults\*.trx" /d:sonar.cs.vscoveragexml.reportsPaths="**\*.coveragexml" /d:sonar.branch.name=master /d:sonar.cs.fxcop.directories="D:\TfsAgent\_work\11\s\Output\Debug\" /d:sonar.cs.fxcop.slnFile="D:\TfsAgent\_work\11\s\Seas.sln"
2019-01-11T20:34:01.0974577Z INFO: sonar.dotnet.visualstudio.solution.file not set
2019-01-11T20:34:01.0974577Z WARNING: WARN: FxCop plugin missed the definition of what to scan. Please set one of folowing properties:sonar.cs.fxcop.assembly, sonar.cs.fxcop.project, sonar.cs.fxcop.reportPath or sonar.cs.fxcop.slnFile
2019-01-11T20:34:01.0974577Z WARNING: WARN: Use default sln file found: D:\TfsAgent\_work\11\s\PathManagement\src\Servus.PathManagement.sln
I can see that you are close to the next release, so I will wait for it and check back again
I've configured my solution to build with a specific output directory instead of using the projects /bin/[Configuration] path.
But even if I set the parameters, FxCop is trying to find the files at the default path.
I'm starting the analysis with this:
##[debug]/d:sonar.cs.vstest.reportsPaths="D:\TfsAgent\_work\6\TestResults\*.trx" /d:sonar.cs.vscoveragexml.reportsPaths="**\*.coveragexml" /d:sonar.branch.name="master" /d:sonar.cs.fxcop.slnFile="D:\TfsAgent\_work\6\s\Seas.sln" /d:sonar.dotnet.visualstudio.solution.file="D:\TfsAgent\_work\6\s\Seas.sln" /d:sonar.cs.fxcop.directory="D:\TfsAgent\_work\6\s\Output\Debug"
Additionally sonar.cs.fxcop.slnFile is also defined within SQ to "s\Seas.sln"
In the log I get the following errors:
The all the files reside at
D:\TfsAgent\_work\6\s\Output\Debug\
What's going wrong here? Why is it searching for all configurations? The build was started with Debug.Did I miss some configuration?