Reputation: 15313
My TFS builds seem to be failing intermittently and I can't figure out the reason quite yet. It appears to be failing because of some kind of unit test failures but there aren't any failing tests that show up. For example a build failure is reported and I see the following error:
Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe failed with return code: 1
Vstest exited with return code: 1.
Here is what I see in the test summary for this "failing" build:
Then I will see the same build succeed the next time it's ran with. No new tests were added or deleted that triggered these builds:
Upvotes: 2
Views: 274
Reputation: 31075
You could add a build task after test task, and select condition Run this task only when a previous task has failed
. Also, specify msbuild argument /t:Clean
in this task to clean build:
Upvotes: 1