views:

31

answers:

1

When I load my executable in NUnit, the application appears to be "locked". I run the tests but when I want to make some modifications to them, I have to close NUnit first otherwise my compilation will fail.

Is there any workaround for this?

EDIT

According to Process Explorer, the only process accessing my executable right now are "nunit-agent.exe" and "nunit.exe"

+4  A: 

Check that you have "Enable Shadow Copy" enabled in NUnit's options (Tools -> Settings -> Test Loader -> Advanced). With this option enabled, NUnit works with a copy of your assembly, not the original compiled version. This means that you can edit and recompile assemblies while NUnit is still running.

If you also enable "Reload when test assembly changes" (Tools -> Settings -> Test Loader -> Assembly Reload), NUnit will notice that you have recompiled and automatically reload your new assembly.

adrianbanks
I have all of this but same problem
Eric
@Eric: Are you sure it's NUnit locking the file?
adrianbanks
Pretty sure : When I close NUnit everything works. Process Monitor shows that NUnit opens the file, nothing else touches it then VS can't access it because another process uses it
Eric
Agreed. I doubt NUnit is the culprit. More likely another copy of Visual Studio is running with a project that also references that dll.
Russell McClure
Somehow, I cleaned everything and created a new NUnit project and everything seems fine now... No clue on what it was
Eric