1

I have a user control class BaseUserControl and a class DerivedUserControl which is derived from BaseUserControl. Both are shown correctly in the Visual Studio Designer, also after rebuilding the solution.

In the BaseUserControl I have a protected label and other protected controls. This label I wanted to hide for derived controls. So I searched for its name in the user code file as well as in the designer code file of DerivedUserControl for guaranteeing that it is not used by the DerivedUserControl and found no occurrences. Then I set the modifier of this label in the designer of BaseUserControl from protected to private for hiding it. I did not change any other control and no code file.

Then I rebuild the solution again and want to show the designer of DerivedUserControl. But now Visual Studio crashed.

Therefore I tried to solve the problem by resetting the label modifier per hand to protected in the designer code file of BaseUserControl. But in spite of rebuilding Visual Studio still always crashes if I open the designer of DerivedUserControl.

I have Microsoft Visual Studio Ultimate 2012 Version 11.0.61030.00 Update 4 and Microsoft .NET Framework Version 4.5.50938.

Has anyone an idea for solving this problem?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
user3570134
  • 109
  • 8
  • What error do you get? do you mean visual studio crashes or your program crashes? – Sayse Sep 01 '14 at 13:32
  • Visual Studio crashes without any exact error message. "Visual Studio does not function." Then it want to restart itself. – user3570134 Sep 01 '14 at 13:35
  • Is that a protected field or property? If latter post the code. – Sriram Sakthivel Sep 01 '14 at 13:39
  • A simple Label field which was auto-generated by the designer if one create a Label in the designer. – user3570134 Sep 01 '14 at 13:41
  • Sorry, No Idea. In my experience, if you are referring the property and that property causes recursion this will happen. – Sriram Sakthivel Sep 01 '14 at 13:42
  • Your `question` is pretty much `unreadable` because of the `highlighting`. Please show an excerpt of the relevant code instead of writing three paragraphs about what it looks like. :) – CodeCaster Sep 01 '14 at 13:54
  • Check the "Application" event log in the Windows event Viewer and look for the event that's written when an application crashes, you'll find two if Windows Error Reporting is turned on. One of these should contain a stacktrace. Please add it to the question. – jessehouwing Sep 01 '14 at 14:39

1 Answers1

0

It looks like that some resources which are used in the BaseUserControl were deleted. Now I have added them again and it runs. But unfortunately I do not know how them were removed and why the BaseUserControl could be shown without any error in the designer but not the DerivedUserControl.

user3570134
  • 109
  • 8