Skip to content
New issue

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

[DevExE2E] Error 'RemoveMethodParameterFix...' appears after entering wrong code. #2675

Closed
WenJunJi01 opened this issue Feb 15, 2023 · 0 comments · Fixed by xunit/xunit.analyzers#156

Comments

@WenJunJi01
Copy link

Affected Branch: Rel.d17.5
Affected Build: Version 17.5.0 [33411.0.d17.5]
Affected Product Language:
Affected Build Link: Pipelines - Run rel.d17.5-33411.00 (visualstudio.com)

Steps to reproduce:

1.Create a xUnit Test Project(net7.0)
2.Replace Test1 with follwoing code

[Theory]
        [InlineData(1, 1)]
        public void Test1(int ,)
        {

        }

3.Add a space to the right of the ','
image

Note:
1.It isn't a regression issue, also repro on Version 17.4.4
2.Not repro for mstest(net7.0).
image
3.Repro VM: 10.214.92.193.

Expected result:
No error should appear.

Actual result:
Error " 'RemoveMethodParameterFix' encountered an error and has been disabled. Show Stack Trace Enable Enable and ignore future errors" shows.
image

Please refer to attachment "RemoveMethodParameterFix.gif".
RemoveMethodParameterFix

--Logs:

System.NullReferenceException : Object reference not set to an instance of an object.
   at async Xunit.Analyzers.FixProviders.RemoveMethodParameterFix.RegisterCodeFixesAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.CodeFixes.CodeFixService.GetCodeFixesAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants