Skip to content

Instantly share code, notes, and snippets.

@aler
Created September 17, 2010 06:21
Show Gist options
  • Save aler/583813 to your computer and use it in GitHub Desktop.
Save aler/583813 to your computer and use it in GitHub Desktop.
Run NUnit from VS.NET
' How to run NUnit inside visual studio on each successful build
' Go Tools -> Macros -> Macro IDE -> Project Explorer/EnvironmentEvents module
' Paste text bello
' see how to setup NUnit external command http://blog.rwendi.com/CategoryView,category,NUnit.aspx
Dim WasSuccess = True
Private Sub BuildEvents_OnBuildDone(ByVal Scope As EnvDTE.vsBuildScope, ByVal Action As EnvDTE.vsBuildAction) Handles BuildEvents.OnBuildDone
If WasSuccess = True Then
DTE.ExecuteCommand("Tools.ExternalCommand1")
End If
End Sub
Private Sub BuildEvents_OnBuildProjConfigDone(ByVal Project As String, ByVal ProjectConfig As String, ByVal Platform As String, ByVal SolutionConfig As String, ByVal Success As Boolean) Handles BuildEvents.OnBuildProjConfigDone
If Success = False Then
WasSuccess = False
Else
WasSuccess = True
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment