ErrorProne.NET icon indicating copy to clipboard operation
ErrorProne.NET copied to clipboard

Analyzer throws an exception with message 'Syntax node is not within syntax tree'

Open rotanov opened this issue 2 years ago • 2 comments

I have a .NET8 project, the analyzer throws an exception:

warning: AD0001: Analyzer 'ErrorProne.NET.StructAnalyzers.MakeStructMemberReadOnlyAnalyzer' threw an exception of type 'System.ArgumentException' with message 'Syntax node is not within syntax tree'.

I tried 0.4.0-beta.1 and 0.6.1-beta.1.

I understand that's not enough information to get to the cause. Is there any way to debug it locally?

rotanov avatar Jan 29 '24 21:01 rotanov

Same here.

Most .NET 8.0 projects are fine, except for the one which uses ref readonly parameters introduced in C#12, which give 'Syntax node is not within syntax tree'.

eludias avatar Feb 16 '24 20:02 eludias

Identical when using .NET Framework 4.8.

Selmar avatar Apr 07 '24 11:04 Selmar