1

I'm working on web API project. I have written unit tests and i am using Nunit to run these tests. I encountered this strange error.

I opened Nunit.exe and under Project > Add Assembly i specify my dll which has unit tests. I click Run and tests execute fine.

I go back to Visual Studio 2015 and make some edits to my tests and Build. It says,

Could not copy 'location/of/dll'. Exceeded retry count of 10. Failed.
The process cannot access the file 'location/of/dll' because it is being used by another process. 

When i close NUnit application, build works fine.

But this was not the case a few hours back. Whenever i click Build in VS2015, in Nunit GUI it used to display Reloading.. and the dll used to reload.

I have to close Nunit > Build in VS > Open Nunit > Add assembly reference > Run to run my test cases. Has anyone faced the same isuue?

Nameless
  • 1,026
  • 15
  • 28

1 Answers1

1

You have to move your nunit project to the same location as the dll files are. I heard that it has to do with the shadow copy.

Here are some places, where a similar question has been asked.

Link 1 Link 2

Community
  • 1
  • 1
  • Thanks for the links. I ll try putting the projects in the same location. I didn't get suggestion that the question is duplicate while i was asking the question. :D – Nameless Apr 13 '17 at 09:23
  • u ll know if i have accepted it as answer or not.. :D – Nameless Apr 13 '17 at 09:47