3
votes

I have a problem with Visual Studio 2010. I'm trying to add a button and associate an event to it. But when I double-click or right-click -> Add Event Handler, my IDE stop responding and it gives me an error:

Microsoft Visual Studio has encounter a problem and needs to restart.

I've tried all the ways that I know to add an event to a control. I even changed the control to radio button or a label, and I when I try to set any event to any control, my VS crashes.

Is this an known problem? Am I doing something wrong?

My project is a Dialog-based MFC application.

I've tried to add an event to a different project (a test project that I downloaded from the web) and it works.

1
I've never seen this before. That's a pretty hard crash, definitely not a known bug. My guess is something got corrupted with your installation of Visual Studio. Try reinstalling on top of your existing copy and see if that fixes it.Cody Gray
I had a VS2008 version installed then i installed VS2010 and uninstall 2008 ...could that by the problem?Gabriel
It shouldn't, of course, but it's certainly a possibility, if you uninstalled VS 2008 after you installed VS 2010. It isn't too difficult to reinstall 2010 right on top of itself. That'll fix any problems you might have.Cody Gray
At times like this, attaching a debugger (could even be another instance of VS) to VS can help hunt down the problem. Given that your project is C++, not sure how much this will tell you. But this technique is more helpful with .NET since some of your very own code (or third party libs) can get run during design time.Chris O
You can always try creating the event manually.rmrrm

1 Answers

0
votes

I have the same problem . When trying to add an event handler to a checkbox, VS crashes and eventually restarts. The same project and specific dialog resource did not have this problem some days ago.

I did not have any 2008 version installed as OP did.

I think something got corrupted, possibly in the .rc file, but I am not sure how to fix it.