Whenever I tried to copy 4 files into my bin folder, after stopping the main service, I am getting an error with one file (TexteDll). The error is:
Cannot co
Are you running any Anti-virus software. It's possible that the AV software (or some other piece of software) was reading the file using the file mapping APIs which caused the problem.
Others have already established that this error is due to another application having a lock on the file. Just wanted to point out that git diff
locks files as well until you quit out of it. That's what caused this in my case.
I had the same issue. How I resolved it was:
In my case I had to kill a hanging MSBuild.exe
process that was locking the file (it was there even after I closed Visual Studio).
My issue was also solved by sifting through the Process Explorer. However, the process I had to kill was the MySQL Notifier.exe that was still running after closing all VS and SQL applications.
in my case deleted the obj folder in project root and rebuild project solved my problem!!!