You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Analyzer 'WpfAnalyzers.ClrPropertyDeclarationAnalyzer' threw an exception of type 'System.ArgumentOutOfRangeException' with message 'Specified argument was out of the range of valid values.
#291
Closed
weisangwtg opened this issue
Nov 20, 2020
· 2 comments
I got these errors when updated to WpfAnalyzers (3.5.1) recently.
1>CSC : error AD0001: Analyzer 'WpfAnalyzers.ClrPropertyDeclarationAnalyzer' threw an exception of type 'System.ArgumentOutOfRangeException' with message 'Specified argument was out of the range of valid values.
1> Parameter name: index'.
1> Exception occurred with following context:
1> Compilation: CargoWise.Glow.UI.Infrastructure
1> SyntaxTree: D:\Validation\ModelValidationResult.cs
1> SyntaxNode: public bool IsAcknowledged { get ... [PropertyDeclarationSyntax]@[2243..2317) (80,2)-(84,3)
1> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
1> Parameter name: index
1> at Microsoft.CodeAnalysis.SyntaxList`1.get_Item(Int32 index)
1> at WpfAnalyzers.DependencyObject.SetCurrentValue.Find(MethodOrAccessor node, SemanticModel semanticModel, CancellationToken cancellationToken)
1> at WpfAnalyzers.ClrPropertyDeclarationAnalyzer.Handle(SyntaxNodeAnalysisContext context)
1> at WpfAnalyzers.ClrPropertyDeclarationAnalyzer.<>c.<Initialize>b__3_0(SyntaxNodeAnalysisContext x)
1> at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.<>c__58`1.<ExecuteSyntaxNodeAction>b__58_0(ValueTuple`2 data)
1> at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action`1 analyze, TArg argument, Nullable`1 info)
1> -----
1> Suppress the following diagnostics to disable this analyzer: WPF0003, WPF0012, WPF0032, WPF0035, WPF0036
related code:
public bool IsAcknowledged
{
get { return false; }
set { }
}
2>CSC : error AD0001: Analyzer 'WpfAnalyzers.ClrMethodDeclarationAnalyzer' threw an exception of type 'System.ArgumentOutOfRangeException' with message 'Specified argument was out of the range of valid values.
2> Parameter name: index'.
2> Exception occurred with following context:
2> Compilation: CargoWise.Glow.UI.Controls
2> SyntaxTree: D:\Accordion\Accordion.cs
2> SyntaxNode: static void OnAccordionButtonStylePropertyChanged ... [MethodDeclarationSyntax]@[23118..23235) (664,2)-(666,3)
2> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
2> Parameter name: index
2> at Microsoft.CodeAnalysis.SyntaxList`1.get_Item(Int32 index)
2> at WpfAnalyzers.DependencyObject.SetValue.Find(MethodOrAccessor node, SemanticModel semanticModel, CancellationToken cancellationToken)
2> at WpfAnalyzers.SetAttached.Match(MethodDeclarationSyntax method, SemanticModel semanticModel, CancellationToken cancellationToken)
2> at WpfAnalyzers.ClrMethodDeclarationAnalyzer.Handle(SyntaxNodeAnalysisContext context)
2> at WpfAnalyzers.ClrMethodDeclarationAnalyzer.<>c.<Initialize>b__3_0(SyntaxNodeAnalysisContext x)
2> at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.<>c__58`1.<ExecuteSyntaxNodeAction>b__58_0(ValueTuple`2 data)
2> at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action`1 analyze, TArg argument, Nullable`1 info)
2> -----
2> Suppress the following diagnostics to disable this analyzer: WPF0004, WPF0013, WPF0033, WPF0034, WPF0042, WPF0061
related code:
public static readonly DependencyProperty AccordionButtonStyleProperty =
DependencyProperty.Register(
nameof(AccordionButtonStyle),
typeof(Style),
typeof(Accordion),
new PropertyMetadata(null, OnAccordionButtonStylePropertyChanged));
The text was updated successfully, but these errors were encountered:
I got these errors when updated to WpfAnalyzers (3.5.1) recently.
related code:
related code:
The text was updated successfully, but these errors were encountered: