SonarQube for MSBuild - End Analysis: Error during

2019-09-11 15:54发布

问题:

##[error]15:41:48.530 ERROR: Error during SonarQube Scanner execution
##[error]java.lang.IllegalStateException: Line 33 is out of range in the file Controllers/BaseAccessRequestController.cs (lines: 30)

I am using Sonar 5.6.5 version and MSBuild 14. Sonar is running as Windows Service. If I exclude this controller then same error comes for other random controller. If I exclude all controllers but keep one or two for which unit tests are written then error goes away but the coverage is shown as 0,0%.

回答1:

I am able to fix this issue after removing Microsoft Build Tools 2015 and Visual studio Enterprise 2015 with Updates 2015 from TFS Build server and reinstalling it again.