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
warning AD0001: Analyzer 'Microsoft.Dynamics.Nav.CodeCop.Design.Rule189ApplicationAreaHasInvalidValue' threw an exception of type 'System.ArgumentException' with message 'System.ArgumentException: An item with the same key has already been added. Key: S4LALeasing
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)
at Microsoft.Dynamics.Nav.CodeCop.Design.Rule189ApplicationAreaHasInvalidValue.ExtractAppAreaFromFields(PooledList1 fields, PooledNameObjectDictionary1 appAreas, StringBuilder stringBuilder) in X:\Prod\Microsoft.Dynamics.Nav.CodeCop\Design\Rule189ApplicationAreaHasInvalidValue.cs:line 162
at Microsoft.Dynamics.Nav.CodeCop.Design.Rule189ApplicationAreaHasInvalidValue.GetApplicationAreas(CompilationStartAnalysisContext ctx, String& validAppAreasOrder) in X:\Prod\Microsoft.Dynamics.Nav.CodeCop\Design\Rule189ApplicationAreaHasInvalidValue.cs:line 138
at Microsoft.Dynamics.Nav.CodeCop.Design.Rule189ApplicationAreaHasInvalidValue.b__3_0(CompilationStartAnalysisContext compilationStartAnalysisContext) in X:\Prod\Microsoft.Dynamics.Nav.CodeCop\Design\Rule189ApplicationAreaHasInvalidValue.cs:line 35
at Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock(DiagnosticAnalyzer analyzer, Action analyze, Nullable`1 info) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\DiagnosticAnalyzer\AnalyzerExecutor.cs:line 1088'
The text was updated successfully, but these errors were encountered:
Hi,
We found ourselfves in situation where we receive a warning from analyzer with ID AD0001, which shouldnt be considered as warning.
We have a field obsoleted on Application Area Setup extension:
tableextension 17031631 "S4LA Appl. Area Setup Ext." extends "Application Area Setup"
{
fields
{
field(17021801; "S4LA Leasing"; Boolean)
{
DataClassification = CustomerContent;
Caption = '(Obsolete) S4Leasing';
Description = 'S4Leasing new Application area';
ObsoleteState = Removed;
ObsoleteReason = 'SL63 replaced by another field S4LALeasing';
ObsoleteTag = '63.0.0.0';
}
field(17021802; S4LALeasing; Boolean)
{
Caption = 'S4LA Leasing';
DataClassification = CustomerContent;
}
}
}
Analyzer shows warning:
warning AD0001: Analyzer 'Microsoft.Dynamics.Nav.CodeCop.Design.Rule189ApplicationAreaHasInvalidValue' threw an exception of type 'System.ArgumentException' with message 'System.ArgumentException: An item with the same key has already been added. Key: S4LALeasing
at System.Collections.Generic.Dictionary
2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary
2.Add(TKey key, TValue value)at Microsoft.Dynamics.Nav.CodeCop.Design.Rule189ApplicationAreaHasInvalidValue.ExtractAppAreaFromFields(PooledList
1 fields, PooledNameObjectDictionary
1 appAreas, StringBuilder stringBuilder) in X:\Prod\Microsoft.Dynamics.Nav.CodeCop\Design\Rule189ApplicationAreaHasInvalidValue.cs:line 162at Microsoft.Dynamics.Nav.CodeCop.Design.Rule189ApplicationAreaHasInvalidValue.GetApplicationAreas(CompilationStartAnalysisContext ctx, String& validAppAreasOrder) in X:\Prod\Microsoft.Dynamics.Nav.CodeCop\Design\Rule189ApplicationAreaHasInvalidValue.cs:line 138
at Microsoft.Dynamics.Nav.CodeCop.Design.Rule189ApplicationAreaHasInvalidValue.b__3_0(CompilationStartAnalysisContext compilationStartAnalysisContext) in X:\Prod\Microsoft.Dynamics.Nav.CodeCop\Design\Rule189ApplicationAreaHasInvalidValue.cs:line 35
at Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock(DiagnosticAnalyzer analyzer, Action analyze, Nullable`1 info) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\DiagnosticAnalyzer\AnalyzerExecutor.cs:line 1088'
The text was updated successfully, but these errors were encountered: