MSBuild analysis fails when error keyword is in file (sq v5.6.4)


(Sriram) #1

Template for a good bug report:
Sonarqube Version 5.6.4 , Sonarscanner msbuild
Problem - MSBuild fails when we run in between begin analsyis and end analysis
steps to reproduce
Begin analysis msbuild.exe
MsBuild using 15.0 using solution file
End Analysis

MSBuild analysis fails if there is error keyword in some of the files

(G Ann Campbell) #2


The current version of SonarQube is 7.2.1, and the current LTS is 6.7.4. You’re going to have a hard time finding support for any version before that. You should consider upgrading at your earliest convenience.


(Nicolas Bontoux) #3

To complement Ann’s response, a quick check:

Which code language are these files written in ?

(Sriram) #4

Hi ,

I have this problem with VB.NET code.

(Nicolas Bontoux) #5

Hi Sriram,

Then it all sounds like you’re hitting this known past issue: SONARVB-246 - Build fails when analyzers report location containing " Error:".

This was fixed earlier this year in latest versions, so altogether (as Ann mentioned) it’s important you upgrade to the latest SonarQube version !

(Sriram) #6

Thanks for the response. May i know do we have a workaround apart for this issue other than changing the code?

(Nicolas Bontoux) #7

Hi Sriram,

Workarounds are mentioned in SONARVB-246 , am not aware of anything more (tickets are anyhow the best source of information).

(Sriram) #8

I have removed the rules mentioned in the ticket, but still my issue is not resolved.

(Nicolas Bontoux) #9

It’s possible that other rules are affected as the issue really lies in the underlying stacks (including in microsoft roslyn stack itself!). All in all the only reasonable course of action here is to upgrade to latest versions, where this issue has already been resolved as discussed.