Convert to auto property not working?

In a .net framework 4.8 project I get a compiler warning S2292 Make this an auto-implemented property and remove its backing field.

But R# does not show the action in the action menu or under Extensions → R# → Refactor → Convert.

Why is this? What is holding the action back?

0
4 comments

Hello,

Could you please provide a code sample demonstrating the specified behavior?

Thank you.

0

Hi,

Strangely are all the warnings that I got now all have the option “To auto-property”… 😲

But that was just the reason why I asked, I was surprised I did not have that option. And I had closed VS multiple times that day, so I thought I overlooked something.

Sorry for the disturbance!

 

0

I have a similar problem. Is here better than a new topic? Usually is. So I am not seeing the option here to convert to auto-property. I also cannot find a setting in the inspection options to show a hint or warning for auto property. I just updated ReSharper since I had not done that in a bit. This is a plain old class with backing fields. It is generated from Paste As Special from an XML Soap Request. Grinding out code for serialization this way for … reasons. :)

0

Please sign in to leave a comment.