We help IT Professionals succeed at work.
Get Started

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

jetbet
jetbet asked
on
113 Views
Last Modified: 2016-02-10
"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?
Comment
Watch Question
Software Developer
CERTIFIED EXPERT
Top Expert 2015
Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE