Description
This issue has been moved from a ticket on Developer Community.
I got this error when I try to run the "Add arguments to 'new'" refactor.
Full error inforamations:
“IntroduceVariableCodeRefactoringProvider”遇到了错误,且已被禁用。
System.ArgumentNullException : 值不能为 null。
参数名: argumentList
at Microsoft.CodeAnalysis.CSharp.SyntaxFactory.ImplicitObjectCreationExpression(SyntaxToken newKeyword,ArgumentListSyntax argumentList,InitializerExpressionSyntax initializer)
at Microsoft.CodeAnalysis.CSharp.IntroduceVariable.CSharpIntroduceVariableService.IntroduceLocal(SemanticDocument document,CodeCleanupOptions options,ExpressionSyntax expression,Boolean allOccurrences,Boolean isConstant,CancellationToken cancellationToken)
at async Microsoft.CodeAnalysis.IntroduceVariable.AbstractIntroduceVariableService6.IntroduceVariableCodeAction.GetChangedDocumentCoreAsync[TService,TExpressionSyntax,TTypeSyntax,TTypeDeclarationSyntax,TQueryExpressionSyntax,TNameSyntax](<未知参数>) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.CodeAnalysis.IntroduceVariable.AbstractIntroduceVariableService
6.IntroduceVariableCodeAction.GetChangedDocumentAsyncTService,TExpressionSyntax,TTypeSyntax,TTypeDeclarationSyntax,TQueryExpressionSyntax,TNameSyntax
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetChangedSolutionAsync(<未知参数>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.ComputeOperationsAsync(<未知参数>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.ComputePreviewOperationsAsync(<未知参数>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync(<未知参数>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewOperationsAsync(<未知参数>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewResultAsync(<未知参数>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.<>c__DisplayClass16_0.<GetPreviewAsync>b__0(<未知参数>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsyncT
Original Comments
Feedback Bot on 4/4/2025, 01:15 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.
Feedback Bot on 4/7/2025, 08:18 AM:
This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.
Metadata
Metadata
Assignees
Type
Projects
Status