unable to copy file - access to the path is denied(error msb3021)

 Admin   
840 View    Dec 25 2019 7:14PM

This is just a reference problem. That file is holded by some project as a file reference. Even when you don't do that, some time happends to change from project to file reference. Of course not by VS itself, sometimes we just remove some project from solution, then all projects holding reference from that project, it's posible to use the already copied dll in debug folder and change it to file reference. When you have such problem you should find that dll that is holded as file reference and find the project that is having that reference. Finding this is hard, but here is my procedure for that.
1. Clean the solution in Debug configuration
2. Change the configuration to Realease and clean the solution again
3. Start searching dll.* under the solution folder
4. You will see only the dll that is making you problems, why, because Clean deletes all project reference dll-s but not the file referenced
5. Delete those dll from search window
6. Build the solution
7. Fix the failed project that can't find file reference. Remove missing reference and add it as a project reference.