Closed pri-kise closed 3 months ago
In another repository we have problems in Azure DevOps Build pipeline with this rule, too.
Unhandled exception. System.InvalidCastException: Unable to cast object of type 'Microsoft.Dynamics.Nav.CodeAnalysis.Syntax.TriggerDeclarationSyntax' to type 'Microsoft.Dynamics.Nav.CodeAnalysis.Syntax.GlobalVarSectionSyntax'.
at BusinessCentral.LinterCop.Design.Rule0044AnalyzeTransferFields.FindGlobalVariables(SyntaxNode node)
at BusinessCentral.LinterCop.Design.Rule0044AnalyzeTransferFields.AnalyzeTransferFields(OperationAnalysisContext ctx)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
Unhandled exception. System.InvalidCastException: Unable to cast object of type 'Microsoft.Dynamics.Nav.CodeAnalysis.Syntax.TriggerDeclarationSyntax' to type 'Microsoft.Dynamics.Nav.CodeAnalysis.Syntax.GlobalVarSectionSyntax'.
at BusinessCentral.LinterCop.Design.Rule0044AnalyzeTransferFields.FindGlobalVariables(SyntaxNode node)
at BusinessCentral.LinterCop.Design.Rule0044AnalyzeTransferFields.AnalyzeTransferFields(OperationAnalysisContext ctx)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
I've tested it with the Latest AL Language version. Now it's working fine. I will have to update our pipelines now, but at least it's working now.
We receive the following warning in our Azure DevOps pipeline.
We only have on PageExtension in this app, because this is our template app.
Versions:
Might be related to #588