Generate auto roperty for model from cshtml file removes Refactoring menu.
RS 9
1. I have a partial view template and class something like below:
class Foo {
}
@model Foo
@{
var foo = Foo.IsFoo
}
2. IsFoo is red so I choose via RS to generate a property via Alt+Enter
3. Now I want to make that IsFoo with backing field, hitting Alt+Enter on the generated property in Foo.cs only displays some "weird" "Enter Action NAme" menu.
4. I write a dummy class below class Foo in same file like so
class FooBar {
public inte GiveBackMyQuickFix {get;set;}
}
5. I now can select the property and use see the "normal" menu with "To property with backing field".
What's up with that?
Please sign in to leave a comment.
Hello
Could you please send me a demo solution which will demonstrate the issue? Since following the mentioned steps did not lead to the same result.
Thanks!
Hrm ok I will have to get back to you on that, thanks.
Finally, I was able to reproduce the issue https://youtrack.jetbrains.com/issue/RSRP-432404. It looks as if ReSharper stops analyzing a file with property generated.
Thanks!