We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
int x = 1; class Program { static void Main(string[] args) { } }
int x = 1;
NullReferenceException: > Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitGlobalStatement(Microsoft.CodeAnalysis.CSharp.Syntax.GlobalStatementSyntax node) Line 1851 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.Syntax.GlobalStatementSyntax.Accept<Microsoft.CodeAnalysis.SyntaxNode>(Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor<Microsoft.CodeAnalysis.SyntaxNode> visitor) Line 4881 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(Microsoft.CodeAnalysis.SyntaxNode node) Line 41 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxNodeRemover.SyntaxRemover.Visit(Microsoft.CodeAnalysis.SyntaxNode node) Line 176 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitListElement<Microsoft.CodeAnalysis.CSharp.Syntax.MemberDeclarationSyntax>(Microsoft.CodeAnalysis.CSharp.Syntax.MemberDeclarationSyntax node) Line 167 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitList<Microsoft.CodeAnalysis.CSharp.Syntax.MemberDeclarationSyntax>(Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.MemberDeclarationSyntax> list) Line 144 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitCompilationUnit(Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax node) Line 1980 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax.Accept<Microsoft.CodeAnalysis.SyntaxNode>(Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor<Microsoft.CodeAnalysis.SyntaxNode> visitor) Line 7750 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(Microsoft.CodeAnalysis.SyntaxNode node) Line 41 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxNodeRemover.SyntaxRemover.Visit(Microsoft.CodeAnalysis.SyntaxNode node) Line 176 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxNodeRemover.RemoveNodes<Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode>(Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode root, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> nodes, Microsoft.CodeAnalysis.SyntaxRemoveOptions options) Line 34 C# Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.RemoveNodesCore(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> nodes, Microsoft.CodeAnalysis.SyntaxRemoveOptions options) Line 525 C# Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.SyntaxNodeExtensions.RemoveNode<Microsoft.CodeAnalysis.SyntaxNode>(Microsoft.CodeAnalysis.SyntaxNode root, Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.SyntaxRemoveOptions options) Line 269 C# Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.Editing.SyntaxGenerator.RemoveNode(Microsoft.CodeAnalysis.SyntaxNode root, Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.SyntaxRemoveOptions options) Line 1199 C# Microsoft.CodeAnalysis.CSharp.Workspaces.dll!Microsoft.CodeAnalysis.CSharp.CodeGeneration.CSharpSyntaxGenerator.RemoveNodeInternal(Microsoft.CodeAnalysis.SyntaxNode root, Microsoft.CodeAnalysis.SyntaxNode declaration, Microsoft.CodeAnalysis.SyntaxRemoveOptions options) Line 2945 C# Microsoft.CodeAnalysis.CSharp.Workspaces.dll!Microsoft.CodeAnalysis.CSharp.CodeGeneration.CSharpSyntaxGenerator.RemoveNode.AnonymousMethod__0(Microsoft.CodeAnalysis.SyntaxNode r) Line 2886 C# Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.Editing.SyntaxGenerator.PreserveTrivia<Microsoft.CodeAnalysis.SyntaxNode>(Microsoft.CodeAnalysis.SyntaxNode node, System.Func<Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode> nodeChanger) Line 1254 C# Microsoft.CodeAnalysis.CSharp.Workspaces.dll!Microsoft.CodeAnalysis.CSharp.CodeGeneration.CSharpSyntaxGenerator.Isolate(Microsoft.CodeAnalysis.SyntaxNode declaration, System.Func<Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode> editor) Line 1959 C# Microsoft.CodeAnalysis.CSharp.Workspaces.dll!Microsoft.CodeAnalysis.CSharp.CodeGeneration.CSharpSyntaxGenerator.RemoveNode(Microsoft.CodeAnalysis.SyntaxNode root, Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.SyntaxRemoveOptions options) Line 2886 C# Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.Editing.SyntaxEditor.RemoveChange.Apply(Microsoft.CodeAnalysis.SyntaxNode root, Microsoft.CodeAnalysis.Editing.SyntaxGenerator generator) Line 294 C# Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.Editing.SyntaxEditor.GetChangedRoot() Line 88 C# Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.CodeFixes.SyntaxEditorBasedCodeFixProvider.FixAllWithEditorAsync(Microsoft.CodeAnalysis.Document document, System.Func<Microsoft.CodeAnalysis.Editing.SyntaxEditor, System.Threading.Tasks.Task> editAsync, System.Threading.CancellationToken cancellationToken) Line 47 C#
The text was updated successfully, but these errors were encountered:
cc @AlekseyTs
Sorry, something went wrong.
@cston Is this a dupe of #44273?
Yes, this is a dupe of #44273. I'm working on a fix. Closing
No branches or pull requests
int x = 1;
statement, and choose "Remove unused variable"The text was updated successfully, but these errors were encountered: