I have a Psake script that works great locally. It runs great; however, Nunit spins up nunit-agent.exe processes and will not dispose of them.
This isn't an issue locally since I am not pulling down fresh copies of my repository (which contains Nunit) each build.
On the build server, which is pulling down fresh copies, this breaks since the files associated with nunit-agent.exe are locked and still running after the first successful run.
Is there a way to clean up the processes after nunit has ran or is there a different way I should be calling nunit?
Snippet from my PSake script:
$nunit = "$toolsDirectory\NUnit\net-2.0\nunit-console-x86.exe"
# paths to test assemblies get passed into this function
function RunNunit ($test_assembly) {
exec { & $nunit $test_assembly /nologo /nodots /xml=$test_assembly.xml }
}