Hi, I’ve setup our project and Sonar Scanner for MSBUILD via Jenkins plugin. The build passes in the end and I get a successful artifact but no .cs
files get analyzed, only .cshtml
and .aspx
.
versions used
- SonarQube 8.2
- SonarScanner for MSBuild 4.8.0.12008 - .NET Fwk 4.6
- MSBuild 14.0.25420.1
- Project targets .NET 4.6.1
- Build node Windows Server 2016
error observed
I constantly get the following error in every project that I try to build:
CSC : warning AD0001: Analyzer 'SonarAnalyzer.Rules.CSharp.XmlExternalEntityShouldNotBeParsed' threw an exception of type 'System.IO.FileNotFoundException' with message 'Could not load file or assembly 'System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.'.
steps to reproduce
Run the build from Jenkins.
Probably happens because using the older MSBuild.
potential workaround
I haven’t found any workarounds, but have tried older versions of SonarScanner down to 3.0 and still the same behavior.
Any help would be appreciated!