Loading ...
Sorry, an error occurred while loading the content.

Re: VS2005 "BuildDone" events

Expand Messages
  • wiseowlconsulting
    I was just looking at this same problem. It s easily reproducable. But the symptoms can vary depending on how thoroughly you test so it s easily missed. There
    Message 1 of 7 , Apr 1, 2006
    • 0 Attachment
      I was just looking at this same problem. It's easily reproducable.
      But the symptoms can vary depending on how thoroughly you test so
      it's easily missed.

      There are a number of bugs in VS2005 in the event parameters to the
      OnBuildBegin and OnBuildDone events.

      First, if you do a Rebuild, the Action parameter to OnBuildBegin
      seems to always be vsBuildActionBuild. I've not yet seen the
      appropriate vsBuildActionRebuildAll action.

      Further, the OnBuildDone event's Action parameter will always be a
      stale value from a prior build when a user selects the Rebuild
      Solution command, but will be correct for the Build and Clean
      operations.

      For example, start VS2005 and perform a Rebuild Solution as the
      first type of build. The Begin event action is vsBuildActionBuild
      (which is incorrect) and the Done event action is zero (which is
      incorrect).

      Then perform a Clean Solution, the OnBuildBegin action is
      vsBuildActionClean and the OnBuildDone action is also
      vsBuildActionClean. This is correct.

      However, if I immediately follow that with a Rebuild Solution, the
      OnBuildBegin action is vsBuildActionBuild (incorrect again) but the
      OnBuildDone action is still vsBuildActionClean (grossly incorrect).

      When I immediately follow that with another Rebuild Solution, the
      OnBuildBegin action is vsBuildActionBuild but the OnBuildDone action
      is still vsBuildActionClean.

      However, when I use the Build Solution command, not the Rebuild
      Solution command, the OnBuildBegin action is vsBuildActionBuild but
      the OnBuildDone action is still vsBuildActionBuild. Both are correct
      but by now I've not a high degree of confidence in the Action
      values. Maybe I was luckly or the ordering worked out.

      It seems like the Rebuild Solution command doesn't pass the correct
      Action parameter to either the OnBuildBegin or OnBuildDone events.
      It appears to always be passing vsBuildActionBuild to the Begin
      event and the prior Action to the Done event.


      --- In vsnetaddin@yahoogroups.com, "Carlos J. Quintero"
      <carlosq@...> wrote:
      >
      > Hi Anna,
      >
      > > The project was simple AppWizard generated MFC app we'd
      generated for the
      > > purposes of testing an add-in with VS2005, and the build was
      initiated
      > > manually using the Rebuild All command on the Build menu.
      >
      > I can not reproduce using those steps. I get vsBuildActionBuild
      and not 0.
      >
      > Best regards,
      >
      > Carlos J. Quintero
      >
      > MZ-Tools: Productivity add-ins for Visual Studio
      > You can code, design and document much faster:
      > http://www.mztools.com
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.