Link to home
Start Free TrialLog in
Avatar of jetbet
jetbetFlag for New Zealand

asked on

C# VS2013 GUI error when trying to view Main form in designer

"Events cannot be set on the object passed to the event binding service because a site associated with the object could not be located."

I have a GUI that uses multiple User Controls and accesses the onclick methods via delegates on the main form.
When I try to view the Main Form in the designer I get the error shown above. The Application builds and runs fine.

I get the option of Ignore and Continue when the error shows which warns me ""Ignoring these exceptions will put the designer in an unstable state that could result in the loss of controls. Do you want to continue?"

Selecting "Yes" shows me the Gui and there does not appear to be anything missing.

The only thing I have found on the Internet is an old comment from 2012
"Take any delegate or event handler registrations out of InitializeComponent. Although the objects are properly created and it all compiles and works fine it seems to screw up the form designer in VS2005." This comment, from StackOverflow, was never accepted or commented on by the author of the original question.

Does anyone know what the issue is and how I can get rid of this error?
ASKER CERTIFIED SOLUTION
Avatar of Naitik Gamit
Naitik Gamit
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jetbet

ASKER

Fantastic. Works like a charm