I'm having a difficult time understanding what this DIS Validation error means, it shows up as "Critical" and when trying to publish the DIS Output shows a stack trace (below).
I've gone trough all my QAction files and neither them or protocol.xml shows any errors.
Restarting VS2022 does not help.
DIS Output:
2023/11/16 04:40:06.854|Could not compile protocol:
System.MissingMethodException: Method not found: 'Void NuGet.Packaging.Core.PackageIdentity..ctor(System.String, NuGet.Versioning.NuGetVersion)'.
at SLDisCompiler.Protocol.ProtocolBuilder.<BuildQActionDllImports>d__21.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at SLDisCompiler.Protocol.ProtocolBuilder.BuildQActionDllImports(QActionsQAction qa, Project project, IQActions allQActions, PackageReferenceProcessor packageReferenceProcessor, BuildResultItems buildResultItems, ICompliancies compliancies)
at SLDisCompiler.Protocol.ProtocolBuilder.<BuildQAction>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at SLDisCompiler.Protocol.ProtocolBuilder.<BuildQActions>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SLDisCompiler.Protocol.ProtocolBuilder.<BuildResultsAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SLDisCompiler.Protocol.ProtocolBuilder.<BuildAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Skyline.VSX.ProtocolEditor.Documents.ProtocolDocument.<CompileProtocolAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
at Skyline.VSX.ProtocolEditor.Margin.PublishDropDownButton.<>c__DisplayClass19_0.<PublishProtocol>b__0(DoWorkEventArgs a)
2023/11/16 04:40:06.872|Protocol published!
Critical DIS Validation error:
Critical: Unexpected exception in Test 'CSharpSLProtocolCheckTrigger': System.ArgumentException: Syntax node is not within syntax tree
at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.CheckSyntaxNode(CSharpSyntaxNode syntax)
at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetTypeInfo(ExpressionSyntax expression, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CSharp.CSharpExtensions.GetTypeInfo(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynHelper.GetFullyQualifiedName(SemanticModel semanticModel, ExpressionSyntax expression)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynHelper.TryParseValue(ExpressionSyntax expression, SemanticModel semanticModel, Solution solution, Value& value)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynHelper.TryGetVariableValue(ExpressionSyntax expression, SemanticModel semanticModel, Solution solution, Value& value)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynHelper.TryParseValue(ExpressionSyntax expression, SemanticModel semanticModel, Solution solution, Value& value)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynHelper.TryParseValue(ExpressionSyntax expression, SemanticModel semanticModel, Solution solution, Value& value)
at SLDisCSharpAnalysis.CSharpAnalyzer.Classes.Argument.TryParseToValue(SemanticModel semanticModel, Solution solution, Value& value)
at SLDisValidator2.Tests.Protocol.QActions.QAction.CSharpSLProtocolCheckTrigger.QActionAnalyzer.CheckCallingMethod(CallingMethodClass callingMethod)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.VisitInvocationExpression(InvocationExpressionSyntax node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.VisitMethodDeclaration(MethodDeclarationSyntax node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.VisitClassDeclaration(ClassDeclarationSyntax node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at SLDisCSharpAnalysis.CSharpAnalyzer.RoslynVisitor.Visit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node)
at SLDisValidator2.Tests.Protocol.QActions.QAction.CSharpSLProtocolCheckTrigger.CSharpSLProtocolCheckTrigger.Validate(ValidatorContext context)
at SLDisValidator2.Validator.RunValidateTest(IValidate test, ValidatorContext context, List`1 results) (line 0 col 0) [0.0.0]
Hi Robin, this is actually an internal error that happens within DIS which is not necessarily caused by something in your connector or QActions.
Would it please be possible to check if you have the latest version of Visual Studio 2022 installed? Currently that's version 17.8.0. In many cases updating Visual Studio solves this kind of issues.
If the issue remains I would propose to send an email to dis@skyline.be so that the team can follow this up further.
Hi Tom,
I am experiencing the same issue which occured after a visual studio update.
everything is on the latest version but still the same error
I’m running the latest version of Visual Studio 2022 and just recently update DIS to the insider preview to fix an unrelated issue. Upgrading DIS however did not fix this issue so I’ll send an email to support.