diff options
-rw-r--r-- | main/src/addins/MonoDevelop.UnitTesting/Services/AbstractUnitTestEditorExtension.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/addins/MonoDevelop.UnitTesting/Services/AbstractUnitTestEditorExtension.cs b/main/src/addins/MonoDevelop.UnitTesting/Services/AbstractUnitTestEditorExtension.cs index ee58887fcd..6f74c4f2fc 100644 --- a/main/src/addins/MonoDevelop.UnitTesting/Services/AbstractUnitTestEditorExtension.cs +++ b/main/src/addins/MonoDevelop.UnitTesting/Services/AbstractUnitTestEditorExtension.cs @@ -303,8 +303,12 @@ namespace MonoDevelop.UnitTesting return; } - await IdeApp.ProjectOperations.Build (project).Task; - await UnitTestService.RefreshTests (CancellationToken.None); + bool buildBeforeExecuting = IdeApp.Preferences.BuildBeforeExecuting; + + if (buildBeforeExecuting) { + await IdeApp.ProjectOperations.Build (project).Task; + await UnitTestService.RefreshTests (CancellationToken.None); + } foundTest = UnitTestService.SearchTestById (testCase); if (foundTest != null) |