This is a general dot Net referencing problem.
One possibility for this is that it failed to copy the dll in the bin directory, maybe it was used in the memory !!!
Best work for this is to have all your projects in one solution, so your main Application will reference the DAL project not the dll directly.
Another solution is to try "copy local = false"
Last solution is to delete it manually as you did