I'm afraid this question is more about VS2005 than it is about C#, but I can't find an other more appropriate forum on this site to post this.
I have made a derived class of UserControl (C#, let's call it MyUserControl). There are no changes made to it in the designer, because every control on it is generated dynamically at run time. So the thing is quite complex, but it runs fine.
When i open it using the designer, all i see is a gray square. Also this is fine.
Next thing i need is deriving classes of it containing controls put on it using the designer. And this is where it goes wrong. When I add (from Solution Explorer) a derived UserControl to the project and let it inherit from MyUserControl, Visual Studio exits. No error message, no error log, and no more Visual Studio.
I have done some logging in the constructor of MyUserControl, and the constructor is completely executed without error. Also i have commented out all the eventhandlers which might perhaps be executed when the derived class is loaded in the designer. No help.
Because MyUserControl contains a lot of code, the process of commenting out everything until the cause of this behaviour is found, might take a lot of time.
So if somebody knows a common reason why Visual Studio Desiger exits, please post it here.
Thanks in advance
Marcel
I have made a derived class of UserControl (C#, let's call it MyUserControl). There are no changes made to it in the designer, because every control on it is generated dynamically at run time. So the thing is quite complex, but it runs fine.
When i open it using the designer, all i see is a gray square. Also this is fine.
Next thing i need is deriving classes of it containing controls put on it using the designer. And this is where it goes wrong. When I add (from Solution Explorer) a derived UserControl to the project and let it inherit from MyUserControl, Visual Studio exits. No error message, no error log, and no more Visual Studio.
I have done some logging in the constructor of MyUserControl, and the constructor is completely executed without error. Also i have commented out all the eventhandlers which might perhaps be executed when the derived class is loaded in the designer. No help.
Because MyUserControl contains a lot of code, the process of commenting out everything until the cause of this behaviour is found, might take a lot of time.
So if somebody knows a common reason why Visual Studio Desiger exits, please post it here.
Thanks in advance
Marcel