Cole W
Cole W

Reputation: 15313

TFS Build vnext build failing with no failed tests

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: failed 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:

enter image description here

Upvotes: 2

Views: 274

Answers (1)

Cece Dong - MSFT
Cece Dong - MSFT

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:

enter image description here

Upvotes: 1

Related Questions