I\'m using the Ribbon control located on CodePlex, and following the tutorial located here . Once I add the reference, and the proper code in the designer I get this error w
A workaround for me was:
This feels very glitchy and I cannot confirm whether it's a problem with my code (as I'm working on an entirely new codebase) or whether it's a VS2012 bug. If I find out, I will report back.
[ReadOnly(true)]
[Browsable(false)]
Above all properties worked for me
Since the solution outlined by pilotcam didn't work for me, I took a different approach:
In my case it was a user control inside a group control inside a tab control, so I first identified the tab control, then the group control and then the user control.
You could isolate the user control inside a new form to further investigate. In my case it was rather easy; I put checks for design mode around most of the functions inside my control to ensure the code only gets executed if the control is not in design mode.
This fixed my error.
I had the same issue and none of the above answers solved the problem.
At the end, emptying the "bin" folder and rebuild has worked for me.
Interesting; I just ran into this same issue with one of my own forms; which is how I found your relevant and recent question.
Here's how I solved it:
In my case it turned out to be something that I should have conditioned with:
if (!DesignMode)
{
// Do something that should only happen at runtime
}
Don't forget turn turn off all those 'Thrown' options later.
Let me add two more cases when such exception can happen, along with when control tries to do something that is not allowed under design mode:
All that cases produce same extremely meaningful error message, and in this particular two debugging of Visual Studio won't help, so I just ended up with bisecting my designer code.