Search code examples
visual-studiobuildadd-inenvdte

How to get notification when a successful build has finished?


I'm writing an VS add-in and I need to run a certain method after a successful build. I've tried using dte.Events.BuildEvents.OnBuildDone but that event happens even if the build failed.

Is there a property or some other event I should use?


Solution

  • The OnBuildDone event cannot tell you what happened. Some projects in the solution might have built properly, some didn't. You'll need OnBuildProjConfigDone instead. Fires for each project, the Success argument tells you if it worked.