9

I am using Visual Studio 2019 with Live Unit Testing turned on and everything is working fine until I delete a unit test. Now the old unit test is showing as a build failure (even though it doesn't exist anymore).

How can I clear this?

NiteLordz
  • 597
  • 2
  • 18

2 Answers2

17

If you close VS2019 and delete the \.vs\{sln-name}\v16\TestStore folder, and open VS2019 up again, all the old tests in the Live Unit Testing Window are gone.

2

Actually there is an option in Visual Studio 2019 that allows to "Delete Persisted Data" related to Live Unit Testing if data seems to be corrupted:

Visual Studio 2019: Live Unit Testing - Delete Persisted Data

Note that the mentioned button is inactive if Live Unit Testing is running. Stop Live Unit Testing to make button enabled.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83