Reputation: 9821
In ReSharper 8, when a class was missing interface members (properties), I would Alt+Enter and select "Implement Missing Members", which would generate autoproperties like this:
public class MyClass : IHasId {
public int Id { get; set; }
}
However, in ReSharper 9, the following is generated:
public class MyClass : IHasId {
public int Id {
get { throw new System.NotImplementedException(); }
set { throw new System.NotImplementedException(); }
}
}
I have set R# to create automatic properties under "Member Generation", still no effect.
Is this a bug, or am I missing something?
Upvotes: 6
Views: 828
Reputation: 391654
It seems there's some odd options at work here that impact each other.
Do this:
Navigate inside the class (ie. not on the squigglies on the class or interface), and hit Alt+Insert, for generate code, then select "Missing Members".
In the dialog that pops up, only change an option at the bottom, to generate automatic properties:
Then OK out that dialog, note that I didn't pick any items to actually implement. Then try Alt+Enter on the class/interface again.
This seems odd to say the least, but now at least you can "fix" it.
Upvotes: 7