1

While running a build with Sonar Scanner for MSBuild, we are getting the following error

ERROR: Unable to TFS annotate the following file which is not in a mapped TFS workspace: 

We are using TFVC as repository and tried the arguments /d:sonar.scm.enabled=true /d:sonar.scm.provider=tfvc with no success.

We have also checked the stackoverflow question TFS Annotation Error but I am not sure how to do that in a build server where the source code is always getting cleaned.

Shubh Rocks Goel
  • 519
  • 1
  • 6
  • 17
  • Did you investigate the error message? It says "the file isn't mapped in the workspace." Is it mapped in the workspace? If not, does mapping it solve the problem? – Daniel Mann Jun 25 '18 at 16:17
  • Yes the file is mapped correctly. – Shubh Rocks Goel Jun 25 '18 at 16:35
  • Could you add more detail info such as which version of TFS and Sonar Scanner for MSBuild are you using? Have you tried to clearing the cache in your build agent workspace by setting clean=true in your build definition? – PatrickLu-MSFT Jul 03 '18 at 10:32
  • Yes I have tried with setting up clean to true. We are using latest VSTS version. SonarScanner for MSBuild 4.3.1 SonarQube version 6.7.4 (build 38452) – Shubh Rocks Goel Jul 03 '18 at 11:32

0 Answers0