'VisualBasicAddAccessibilityModifiersCodeFixProvider' encountered an error and has been disabled. #46513
Labels
Area-IDE
Bug
Developer Community
The issue was originally reported on https://developercommunity.visualstudio.com
help wanted
The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone
This issue has been moved from a ticket on Developer Community.
[severity:Other]
In any visual basic form, add the text "import sometexthere" above the Public Class Form1 line (without parenthesis). VS will flag it as an error. Clicking the lightbulb icon on the left margin will result in an error stating "'VisualBasicAddAccessibilityModifiersCodeFixProvider' encountered an error and has been disabled."
Clicking the Stack Trace button on the yellow error message shows this:
System.NullReferenceException : Object reference not set to an instance of an object.
at Microsoft.CodeAnalysis.AddAccessibilityModifiers.AbstractAddAccessibilityModifiersCodeFixProvider.<>c__DisplayClass6_0. b__0(SyntaxNode currentDeclaration,SyntaxGenerator generator)
at Microsoft.CodeAnalysis.Editing.SyntaxEditor.ReplaceChange.Apply(SyntaxNode root,SyntaxGenerator generator)
at Microsoft.CodeAnalysis.Editing.SyntaxEditor.GetChangedRoot()
at async Microsoft.CodeAnalysis.CodeFixes.SyntaxEditorBasedCodeFixProvider.FixAllWithEditorAsync()
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetChangedSolutionAsync()
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.ComputeOperationsAsync()
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync()
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewResultAsync()
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.<>c__DisplayClass11_0. b__0()
at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsyncT
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
Original Comments
Feedback Bot on 7/31/2020, 00:08 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: