Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio - test with the same id already exists

I have a Class Library project in Visual Studio and tests for it (everything is written in C#). Once after successful solution build VS shows me this window:

Window screenshot

I haven't seen this one before, and I don't know even from what to begin: project compiles without errors and works after compilation, but this window keep appearing after each compilation. When I press Retry or Abort, error message with the same text appears in Output window of VS.

There is only one test method named AddRange1201.

So, the question is - how to get rid of this, besides just checking "Do not show this dialog box again"?

like image 408
aplavin Avatar asked Jul 23 '11 13:07

aplavin


1 Answers

I found this on MS Connect, and I'm not sure if it will fix your problem or not. Sounds like it's a known issue and occurs if you either add the test project to your solution twice (VS doesn't realize it's been added and removed) or if you switch between debug and release modes.

A workaround given is:

1) clean solutions in both modes 2) rebuild in the mode you want

Hopefully this helps.

like image 181
David Hoerster Avatar answered Oct 03 '22 05:10

David Hoerster