Tuesday, May 27, 2014

How to remove a wrong playlist from Test Explorer in visual studio 2012?

After you create several playlists for your failing unit tests or a custom set of unit tests there will come the time when you want to remove them from the list.
So, in case you will be looking in Text Explorer(Visual Studio Professional 2012) for a way to remove/delete a playlist from your list this is what you will have to do:

1. Close solution
2. Locate your playlist where it is saved and then delete it, easy - isn't it? :)
3. Reopen your solution and re build your solution. Everything should be fine. The playlist should not appear anymore.

Caution: If you delete the playlist while the solution is still opened and then build you will get this nice error:

------ Discover test started ------
Error reading playlist file 'C:\Users\xxx\MyPlaylist.playlist'.


So that is why you need first to close solution.
I hope this helped you, I looked around and found no answer for this. I thought that as a playlist is created from Text Explorer interface it should also be removed from same place.

Have a nice day and leave a comment if this helped you.

4 comments:

  1. Would be useful if you actually mentioned WHERE to look for those bloody playlist files (-_-)
    I can't find mine anywhere but they still show up in Visual Studio.

    ReplyDelete
    Replies
    1. Hopefully you've long since resolved this, but creating a new playlist should at least show you where you saved your last playlist (hopefully you've not been creative and they're all in the same spot).

      Delete
  2. ha ha ha .... rolling on floor laughing

    ReplyDelete