Affects Version/s: None
Fix Version/s: 5.0
In summary, it's a known Roslyn issue #5724 _VBC emitting extra console output on warning with " error:"
_. If the line containing the error contains the string " Error:" then MSBuild will fail. So far it is has only been affected VB rules S103 and S2178.
- disable the affected rules in SonarQube, or
- reformat the code to not include the string "My Error:" e.g. by concatenating two string together "My " & "Error:"
This does not affect the C# analyzers, even though the VB and C# analyzers share common code.
The underlying issue is in the Roslyn Vbc MSBuild task. This wraps the call to the vbc.exe compiler. The corresponding C# task is Csc which wraps the C# compiler csc.exe. The difference is that Vbc does extra processing of the text output returned by the compiler, writing additional output that MSBuild interprets as being errors.
I investigated the Microsoft MSBuild targets and tasks and the _vbc.exe _compiler command line to see if there any options we can set to modify the behaviour, but unfortunately there are not.