There's a famous bug in Visual Studio that prevents you from using the form designer on a subclass of an abstract form.
This problem has already been elucidated and solved most elegantly by Urban Potato; that's not the part I'm having trouble with. The trouble is, I have duplicated the technique described by Urban Potato, and included it in my project (which happens to be pretty big), and now every time I try to open the designer of my derived form, I get that Microsoft "frightfully sorry, old chap, but I'm going to have to kill you now" message (reminiscent of Otto in A Fish Called Wanda) that says "Microsoft Visual Studio 2005 has encountered a problem and needs to close. We are sorry for the inconvenience."
But here's the real kicker: if you just ignore that message, and stuff it away beyond the bottom right corner of the screen, you can carry on working, perfectly normally! Just don't click the "Send Error Report" or "Don't Send" buttons, coz then VS does close.
Still, this phenomenon is highly annoying, and I'd very much like to be able to work without the feeling that my IDE is just looking for some really nasty way to get back at me for pooh-poohing its sage advice to quit now - or else.
Further useful info: this same behavior can be duplicated on all other computers in my office; it's nothing specific to my machine. Obviously something in the project/code is upsetting the IDE, but at least I know the design pattern works, coz after I ignore the crash message, the designer works perfectly well. I just don't know where to start looking for the thing that is causing this problem.
Any ideas?
Thanks!
-
The reason your are getting this problem might be that your base form is an abstracted class. The reason why the IDE will crashes is because the IDE tries to create an instance of the the abstract class which it cannot do.
It might be that you accidentally marked the internal class as abstract too.
Regards,
JvR
Shaul : I implemented the Urban Potato solution exactly. Your answer doesn't explain why the IDE crashes, nor why it continues to function if you just ignore the crash message... -
If it were me, I'd try attaching a debugger (maybe another instance of Visual Studio) to the instance that throws the error dialog, and see if the stack trace gives you any insights into what's causing the error.
From Charlie
0 comments:
Post a Comment