Random Compiler Errors

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

    Random Compiler Errors

    Hi,

    I get random errors raised when compiling a multi-project application. For
    example the compiler will claim that a class has no constructor when it
    does. If I replace the first line of the constructor with the same code ( or
    just re-load VS) and then recompile things are OK for a while but then the
    spurious error comes back. The same sort of random behaviour can occur
    anywhere in my app. - basically the compiler doesn't "see" a line of code.

    Has anyone else experienced this irritating behaviour ? I'm using framework
    v1.1

    Thanks for any help.

    Jon


  • Patrice

    #2
    Re: Random Compiler Errors

    The next time I would do an hexadecimal dump of this portion of code. My
    though is that the source file contains some special character that is not
    handled by the compiler...

    --

    "jon morgan" <jonrmorgan@ntl world.com> a écrit dans le message de
    news:eYNNbfW%23 EHA.2196@TK2MSF TNGP14.phx.gbl. ..[color=blue]
    > Hi,
    >
    > I get random errors raised when compiling a multi-project application. For
    > example the compiler will claim that a class has no constructor when it
    > does. If I replace the first line of the constructor with the same code[/color]
    ( or[color=blue]
    > just re-load VS) and then recompile things are OK for a while but then[/color]
    the[color=blue]
    > spurious error comes back. The same sort of random behaviour can occur
    > anywhere in my app. - basically the compiler doesn't "see" a line of code.
    >
    > Has anyone else experienced this irritating behaviour ? I'm using[/color]
    framework[color=blue]
    > v1.1
    >
    > Thanks for any help.
    >
    > Jon
    >
    >[/color]


    Comment

    • jon morgan

      #3
      Re: Random Compiler Errors

      Thanks Patrice - I tried that with Winhex. There's nothing wrong with the
      lines the compiler zaps. And remember it doesn't always zap the same lines.
      This is a genuinely random error that
      can occur anywhere in my code although on reflection it does tend to be the
      first line of a member that's zapped.

      Jon

      "Patrice" <nobody@nowhere .com> wrote in message
      news:%23x4Ge4W% 23EHA.4004@tk2m sftngp13.phx.gb l...[color=blue]
      > The next time I would do an hexadecimal dump of this portion of code. My
      > though is that the source file contains some special character that is not
      > handled by the compiler...
      >
      > --
      >
      > "jon morgan" <jonrmorgan@ntl world.com> a écrit dans le message de
      > news:eYNNbfW%23 EHA.2196@TK2MSF TNGP14.phx.gbl. ..[color=green]
      >> Hi,
      >>
      >> I get random errors raised when compiling a multi-project application.
      >> For
      >> example the compiler will claim that a class has no constructor when it
      >> does. If I replace the first line of the constructor with the same code[/color]
      > ( or[color=green]
      >> just re-load VS) and then recompile things are OK for a while but then[/color]
      > the[color=green]
      >> spurious error comes back. The same sort of random behaviour can occur
      >> anywhere in my app. - basically the compiler doesn't "see" a line of
      >> code.
      >>
      >> Has anyone else experienced this irritating behaviour ? I'm using[/color]
      > framework[color=green]
      >> v1.1
      >>
      >> Thanks for any help.
      >>
      >> Jon
      >>
      >>[/color]
      >
      >[/color]


      Comment

      • gui_guru

        #4
        RE: Random Compiler Errors

        I have seen this before. Open Configuration Manager and make sure the Build
        checkbox is checked for all projects. I have seen these get unchecked for no
        apparent reason.

        "jon morgan" wrote:
        [color=blue]
        > Hi,
        >
        > I get random errors raised when compiling a multi-project application. For
        > example the compiler will claim that a class has no constructor when it
        > does. If I replace the first line of the constructor with the same code ( or
        > just re-load VS) and then recompile things are OK for a while but then the
        > spurious error comes back. The same sort of random behaviour can occur
        > anywhere in my app. - basically the compiler doesn't "see" a line of code.
        >
        > Has anyone else experienced this irritating behaviour ? I'm using framework
        > v1.1
        >
        > Thanks for any help.
        >
        > Jon
        >
        >
        >[/color]

        Comment

        • jon morgan

          #5
          Re: Random Compiler Errors

          Thanks but , again, I just don't think this is the answer. I haven't noticed
          any erratic behaviour in the build pattern - at one stage I was over 30
          projects and they were all getting built. I've now rationalised down to 10
          but it hasn't affected the random compiler behaviour.

          Jon

          "gui_guru" <guiguru@discus sions.microsoft .com> wrote in message
          news:2BE92698-92D8-426C-B69E-A63F5A6D1A03@mi crosoft.com...[color=blue]
          >I have seen this before. Open Configuration Manager and make sure the Build
          > checkbox is checked for all projects. I have seen these get unchecked for
          > no
          > apparent reason.
          >
          > "jon morgan" wrote:
          >[color=green]
          >> Hi,
          >>
          >> I get random errors raised when compiling a multi-project application.
          >> For
          >> example the compiler will claim that a class has no constructor when it
          >> does. If I replace the first line of the constructor with the same code
          >> ( or
          >> just re-load VS) and then recompile things are OK for a while but then
          >> the
          >> spurious error comes back. The same sort of random behaviour can occur
          >> anywhere in my app. - basically the compiler doesn't "see" a line of
          >> code.
          >>
          >> Has anyone else experienced this irritating behaviour ? I'm using
          >> framework
          >> v1.1
          >>
          >> Thanks for any help.
          >>
          >> Jon
          >>
          >>
          >>[/color][/color]


          Comment

          • gui_guru

            #6
            Re: Random Compiler Errors

            I gather from you reply that all the projects have the Build checkboxs
            checked. Are any of the assemblies installed in the GAC? If so, it is
            possible that the complier is looking at the GAC version instead of your
            code. The next time it happens, try rebuilding the assemblies (without
            changing any code) and then try running it again.

            "jon morgan" wrote:
            [color=blue]
            > Thanks but , again, I just don't think this is the answer. I haven't noticed
            > any erratic behaviour in the build pattern - at one stage I was over 30
            > projects and they were all getting built. I've now rationalised down to 10
            > but it hasn't affected the random compiler behaviour.
            >
            > Jon
            >
            > "gui_guru" <guiguru@discus sions.microsoft .com> wrote in message
            > news:2BE92698-92D8-426C-B69E-A63F5A6D1A03@mi crosoft.com...[color=green]
            > >I have seen this before. Open Configuration Manager and make sure the Build
            > > checkbox is checked for all projects. I have seen these get unchecked for
            > > no
            > > apparent reason.
            > >
            > > "jon morgan" wrote:
            > >[color=darkred]
            > >> Hi,
            > >>
            > >> I get random errors raised when compiling a multi-project application.
            > >> For
            > >> example the compiler will claim that a class has no constructor when it
            > >> does. If I replace the first line of the constructor with the same code
            > >> ( or
            > >> just re-load VS) and then recompile things are OK for a while but then
            > >> the
            > >> spurious error comes back. The same sort of random behaviour can occur
            > >> anywhere in my app. - basically the compiler doesn't "see" a line of
            > >> code.
            > >>
            > >> Has anyone else experienced this irritating behaviour ? I'm using
            > >> framework
            > >> v1.1
            > >>
            > >> Thanks for any help.
            > >>
            > >> Jon
            > >>
            > >>
            > >>[/color][/color]
            >
            >
            >[/color]

            Comment

            • jon morgan

              #7
              Re: Random Compiler Errors

              Thanks, but no I don't have any of my assemblies GACed. Again just to repeat
              an example: I do some work in one project, and go to rebuild my solution.
              The compiler tells me that a class in a different project in the solution
              does not have a constructor. If I delete the first line of the constructor
              and re-instate it the compiler error disappears. Alternatively if I exit and
              reboot VS and all is well.

              Weird or what ...


              "gui_guru" <guiguru@discus sions.microsoft .com> wrote in message
              news:CC3940EB-C323-409E-943F-1AF2216D19B6@mi crosoft.com...[color=blue]
              >I gather from you reply that all the projects have the Build checkboxs
              > checked. Are any of the assemblies installed in the GAC? If so, it is
              > possible that the complier is looking at the GAC version instead of your
              > code. The next time it happens, try rebuilding the assemblies (without
              > changing any code) and then try running it again.
              >
              > "jon morgan" wrote:
              >[color=green]
              >> Thanks but , again, I just don't think this is the answer. I haven't
              >> noticed
              >> any erratic behaviour in the build pattern - at one stage I was over 30
              >> projects and they were all getting built. I've now rationalised down to
              >> 10
              >> but it hasn't affected the random compiler behaviour.
              >>
              >> Jon
              >>
              >> "gui_guru" <guiguru@discus sions.microsoft .com> wrote in message
              >> news:2BE92698-92D8-426C-B69E-A63F5A6D1A03@mi crosoft.com...[color=darkred]
              >> >I have seen this before. Open Configuration Manager and make sure the
              >> >Build
              >> > checkbox is checked for all projects. I have seen these get unchecked
              >> > for
              >> > no
              >> > apparent reason.
              >> >
              >> > "jon morgan" wrote:
              >> >
              >> >> Hi,
              >> >>
              >> >> I get random errors raised when compiling a multi-project application.
              >> >> For
              >> >> example the compiler will claim that a class has no constructor when
              >> >> it
              >> >> does. If I replace the first line of the constructor with the same
              >> >> code
              >> >> ( or
              >> >> just re-load VS) and then recompile things are OK for a while but
              >> >> then
              >> >> the
              >> >> spurious error comes back. The same sort of random behaviour can occur
              >> >> anywhere in my app. - basically the compiler doesn't "see" a line of
              >> >> code.
              >> >>
              >> >> Has anyone else experienced this irritating behaviour ? I'm using
              >> >> framework
              >> >> v1.1
              >> >>
              >> >> Thanks for any help.
              >> >>
              >> >> Jon
              >> >>
              >> >>
              >> >>[/color]
              >>
              >>
              >>[/color][/color]


              Comment

              Working...