I had a problem with VS Designer, which makes it impossible to work with it. What happens is that I am editing my XAML code, and VS Designer at some point throws an exception, with StackTrace looking like this:
InvalidOperationException: property "MyObject.MyProperty" does not have a get method
Stacktrace:
in Microsoft.Expression.DesignModel.Metadata.LocalClrPropertyImplementation.GetValue (object-object) in Microsoft.Expression.DesignModel.Metadata.ClrPropertyReferenceStep.GetValue (Object valueToInspect) in Microsoft.Expression.DesignModel.Metetate.Proet.Proet.Proet.Proet.Proment.Proetty.Proet.Proetty.Proet.Product.Pro ReferenceStep referenceStep, Object target) in Microsoft.Expression.DesignModel.Metadata.PropertyReference.PartialGetValue (Object target, Int32 initialStepIndex, Int32 finalStepIndex) in [...]
... and it continues for another 50 lines.
The corresponding property looks something like this:
private bool _MyProperty = true; public bool MyProperty { set { if (_MyProperty != value) {
Now it works great, and I have things like this in my project, VS has never bothered me with them before. If I try to close and open VS again, it will allow me to work for a while, and then it will again start throwing these errors again.
I tried to clear the solution from compilation> Clean Solution, it does not work.
I really don't know what the problem is. I mean, I created this property like 2 months ago, why does VS just tell me what now?
Is there a fix for this, or do I need to manually add all of these useless get / set methods to every single parameter I created?