AD0001 errors after upgrading to SonarQube 7.3.0.15553 and SonarC# 7.5 (build 6605)

vsts

(Valentijn Makkenze) #1

Hi,

I upgraded to SonarQube 7.3.0.15553 and SonarC# 7.5 (build 6605)

And now the build shows the following AD0001 warnings
CSC : warning AD0001: Analyzer ‘SonarAnalyzer.Rules.CSharp.ConditionEvaluatesToConstant’ threw an exception of type ‘System.NotSupportedException’ with message ‘ConstantPattern’.
CSC : warning AD0001: Analyzer ‘SonarAnalyzer.Rules.CSharp.EmptyCollectionsShouldNotBeEnumerated’ threw an exception of type ‘System.NotSupportedException’ with message ‘ConstantPattern’.
CSC : warning AD0001: Analyzer ‘SonarAnalyzer.Rules.CSharp.EmptyNullableValueAccess’ threw an exception of type ‘System.NotSupportedException’ with message ‘ConstantPattern’.
CSC : warning AD0001: Analyzer ‘SonarAnalyzer.Rules.CSharp.InvalidCastToInterface’ threw an exception of type ‘System.NotSupportedException’ with message ‘ConstantPattern’.
CSC : warning AD0001: Analyzer ‘SonarAnalyzer.Rules.CSharp.NullPointerDereference’ threw an exception of type ‘System.NotSupportedException’ with message ‘ConstantPattern’.
CSC : warning AD0001: Analyzer ‘SonarAnalyzer.Rules.CSharp.ObjectsShouldNotBeDisposedMoreThanOnce’ threw an exception of type ‘System.NotSupportedException’ with message ‘ConstantPattern’.

It does also say which projects but I have no clue as to what part of the code gives these warnings.

Kind regards,

Valentijn


(Alexandre Frigout) #2

Hello Valentijn,

You can find a work around to this in this thread:

Greetings,
Alex.