7

Lately I had a problem (Could not load type '...' from assembly '...') with my test project (unit-test in Visual Studio 2010), so I tried (after looking for solutions here) deleting it and rewriting it. I deleted it by right-clicking on the project in Solution Explorer and choosing 'Remove'. Nevertheless, I can see that the project still exists, if I am looking in the folders (of the entire solution), through windows...

How can I correctly and completely delete the test project? (I have made a backup...)

Michael Schnerring
  • 3,584
  • 4
  • 23
  • 53
Lee
  • 125
  • 1
  • 1
  • 7

2 Answers2

19

Removing it from the project structure just modifies the solution file (.sln). After removing a project it's not anymore listed in there and the reference is gone.

So removing a project from the solution just removes the reference to the project. If you'd like to remove it entirely, delete it manually from its old location on the disk, as well.

Michael Schnerring
  • 3,584
  • 4
  • 23
  • 53
  • 7
    I wonder why it's not possible to permanently delete (project) files inside VS. this way, especially if you work with source control, more and more zombie-files will pile up and this will lead to confusion... is there a workaround for dealing with this? – beta Jan 03 '17 at 14:15
  • In my case the test case playlist was still there, so make sure to take a look to the solution for 'zombie' files as @beta said – DHLopez Oct 17 '17 at 20:03
9

You almost do the right thing... You have to "Remove" from the Solution, by right clicking and "Remove" the project. This action will change the Solution (.sln) file, removing the reference to the project, but the folders will remain in the disk. Then you have to delete it from the disk manually.

Agustin Meriles
  • 4,866
  • 3
  • 29
  • 44