Build Error in Inherited Forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sean

    #1

    Build Error in Inherited Forms

    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?


  • Cor Ligthert

    #2
    Re: Build Error in Inherited Forms

    Sean,
    [color=blue]
    > Does inheritance just not work that reliably in .Net 2003?[/color]

    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


    Comment

    • ocha

      #3
      RE: Build Error in Inherited Forms

      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?

      "Sean" wrote:
      [color=blue]
      > 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?
      >
      >[/color]

      Comment

      Working...