Build/Test Issues

File locking prevents a test from running

Started by angyan on 6,616 views

I am getting this error: The process cannot access the file '<Path>' because it is being used by another process. I assume that this is because of the parallel nature of NCrunch? How do I run unit tests that all try to load up a a single test file?
If you have control of the read operation I suggest you change it so that it does not exclusively lock the file. That way other threads/processes are free to read it in parallel.
I was able to get it working. I actually was not closing the file as well after reading it and once I fixed this, the tests work well.

Post a reply

Log in to reply.