unit-testingtestingduplicatesvisual-studio-2019test-explorer

Visual Studio 2019 showing duplicate tests in Test Explorer


Duplicate Unit Tests started showing up for me in Visual Studio 2019, which I recently upgraded from 2017. I’ve a side by side comparison of Visual Studio 2017 and 2019 below, which shows some test were duplicated and categorised under tests not run: enter image description here

Cleaning the solution didn’t get rid of these tests and the only thing that did, was deleting the git repository and cloning it again.

enter image description here

Has anybody come across this issue and have a better solution that this sledge hammer approach?


Solution

  • I was talking to a colleague who also came across the same issue and he suggested another solution that worked for him.

    This resolved the issue for him and is a less drastic measure that a delete and clone.