Build Error in Inherited Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Studio issue where I have a base Form - FormA. FormB inherits from
FormA. I have a property or a control in FormB called Prop1 that was NOT
inherited from formA.

Sometimes, when I edit a completely unrelated class, I get the following
build error:

Name Prop1 is not declared.

The file name is the file for FormB.

If I close the solution and open the solution back up, everything compiles.
This occurs even without ever touching the source for FormA or FormB.

Recreating the formB doesn't fix the issue either.

Does inheritance just not work that reliably in .Net 2003?
 
Sean,
Does inheritance just not work that reliably in .Net 2003?

I think I can understand your question, however this addition to your
question makes that I do not understand what you are really asking.

Do you want a solution for your problem or an answer on the last question?

As an answer on that, until now I have not seen any problem.

Cor
 
I have had the same thing happen for quite a while. Got used to closing and
reopening the solution whenever the build failed. Typically there are several
forms with "undeclared" controls. On at least one occasion I opened one of
those forms in the designer and found the "undeclared" control had in fact
disappeared. However, after closing and reopening the solution the control
reappeared.

Have you found out any more about this issue since your original post?
 
Back
Top