Roslyn: refactor "extract method" adds casts

Created on 13 Jul 2020  路  4Comments  路  Source: dotnet/roslyn

_This issue has been moved from a ticket on Developer Community._


I have encountered this issue several times. When I use the refactor "extract method" action, the end result adds unnecessary to my code.
This is probably an issue with my codestyle settings, but I don't know which setting is causing this issue


Original Comments

Feedback Bot on 7/13/2020, 01:18 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 7/13/2020, 09:53 AM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2019#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We鈥檒l keep you posted on any updates to this feedback.


Original Solutions

(no solutions)

Area-IDE Bug Developer Community help wanted

Most helpful comment

I made a small repo: https://github.com/puppetSpace/RefactorIssue/tree/master/RefactorIssue
The App.cs class contains the code I want to refactor to a method. I marked the section I want to refactor.

I also made a gif of the issue

repo

All 4 comments

@ryzngard @CyrusNajmabadi Do you know if this is a dupe of a known issue?

i don't believe it's a dupe. This is also not actionable. We'd need a repro to know what's going on here.

Thanks, I have requested the customer to add an actionable repro or more information to this issue.

I made a small repo: https://github.com/puppetSpace/RefactorIssue/tree/master/RefactorIssue
The App.cs class contains the code I want to refactor to a method. I marked the section I want to refactor.

I also made a gif of the issue

repo

Was this page helpful?
0 / 5 - 0 ratings