Hi Andrea,
Based on my understanding, you have a .NET 1.1 WinForms application project
which contains a UserControl called UserControl1. You upgrade this project
to a .NET 2.0 project and create another class that inherits from the
existing UserControl1 in the upgraded .NET 2.0 project. The problem is that
when you open the new UserControl derived from the UserControl1 in the
designer, you get a design time error. If I'm off base, please feel free to
let me know.
I performed a test based on your description, but didn't reproduce the
problem on my side. I can open the new UserControl in the designer without
any error.
In fact, when we open a UserControl in the designer, an instance of the
base class is created. If the base class is not available, the UserControl
won't be opened in the designer correctly.
You may have a try re-creating the UserControl1 in the upgraded .NET 2.0
project and copying the code in the previous UserControl1 to the new
UserControl to see if the problem still exists.
Hope this helps.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
nagar@community.nospam - 25 Jun 2007 22:02 GMT
Hi Linda,
actually all the forms and controls were created in .NET 1.1 and I
noticed that opening an inherited usercontrol didn't work.
I then created two user controls (in .NET 2.0) and tried to make one
inherit form the other. Once again, I'm getting the same design time
error.
The user controls are both in the same project (which is also the main
project that contains the EXE file).
Thanks.
Andrea
>Hi Andrea,
>
[quoted text clipped - 43 lines]
>
>This posting is provided "AS IS" with no warranties, and confers no rights.
Linda Liu [MSFT] - 26 Jun 2007 05:12 GMT
Hi Andrea,
Thank you for your response.
> I then created two user controls (in .NET 2.0) and tried to make one
inherit form the other. Once again, I'm getting the same design time error.
I suggest that you build the project after you create a UserControl and
then create another UserControl that inherits from the previous
UserControl. In this case, you should not get any design time error when
you open the inherited UserControl in the designer.
Please try my suggestion and let me know the result.
Sincerely,
Linda Liu
Microsoft Online Community Support
Linda Liu [MSFT] - 28 Jun 2007 13:05 GMT
Hi Andrea,
How about the problem now?
If you need our further assistance, please feel free to let me know.
Thank you for using our MSDN Managed Newsgroup Support Service!
Sincerely,
Linda Liu
Microsoft Online Community Support
nagar@community.nospam - 28 Jun 2007 20:27 GMT
I've tried what you suggested.
I created a new control and built the project.
Then I created a new user control that inherits from the first one. I
got the same runtime exception.
I just noticed that this happened in the project I'm using (which I
converted from .NET 1.1). If I try to do the same thing on a new
project it seems to work fine.
I've also installed VS 2005 SP1 but nothing changed. Any other
suggestions? Maybe something got corrupted in the project file.
Thanks.
Andrea
nagar@community.nospam - 28 Jun 2007 20:48 GMT
Hi Linda,
I found the problem. It had to do with the delay signature of the
assembly. I removed that and now it works great.
Thanks so much for your help.
Andrea
Linda Liu [MSFT] - 29 Jun 2007 12:33 GMT
Hi Andrea,
Thank you for your feedback on how you succeed in solving the problem.
I am not aware of this. I think it will benefit all of us!
If you have any other question in the future, please don't hesitate to
contact us. It's always our pleasure to be of assistance!
Have a nice weekend!
Sincerely,
Linda Liu
Microsoft Online Community Support