I'm not talking about a post build event for a project. Rather, I want to run an executable automatically after the entire solution is built. Is there a way to do a post build event for the solution?
views:
566answers:
2
+2
A:
not directly.
you can make a project which has a dependency in all other projects and add a post build step to it. Effectively this will cause it to run after everything else.
shoosh
2008-10-07 03:57:57
+11
A:
Yes, you can do this in the Macro Editor by handling OnBuildDone. The event gives you a couple of handy properties you can check: scope (project/solution/batch) and action (build/rebuild/clean/deploy). To do what you want would be something like this (not tested, mind):
Public Sub AfterBuild(ByVal scope As vsBuildScope, ByVal action As vsBuildAction) Handles BuildEvents.OnBuildDone
If scope = vsBuildScope.vsBuildScopeSolution Then
System.Diagnostics.Process.Start("some file I want to run")
End If
End Sub
Kyralessa
2008-10-07 04:35:46
That's awesome! Exactly what i wanted. If I could up vote you more, I certainly would!
Kilhoffer
2008-10-07 14:34:15