Visual Studio "Could Not Copy" .... During Build

Visual Studio Could not copy .... during build

I have encountered similar error messages in Visual Studio 2013.

Mostly, I have found that this situation has occurred when a debug process was halted because of an exception.

When clean+build has not resolved this problem for me, I have had success by doing the following:

  • Closing Visual Studio
  • Deleting the bin and obj folders, and
  • Reopening Visual Studio.

This "bug" has existed since Visual Studio 2003.

Finally, I have also found that I can often overcome this problem by simply renaming the executable file and then deleting it.

Visual Studio Could not copy .... during build

I have encountered similar error messages in Visual Studio 2013.

Mostly, I have found that this situation has occurred when a debug process was halted because of an exception.

When clean+build has not resolved this problem for me, I have had success by doing the following:

  • Closing Visual Studio
  • Deleting the bin and obj folders, and
  • Reopening Visual Studio.

This "bug" has existed since Visual Studio 2003.

Finally, I have also found that I can often overcome this problem by simply renaming the executable file and then deleting it.

Error Could not copy the file obj\Debug\[project-name].dll because it was not found

This is most probably bug in VS2019.
According to some comments on https://developercommunity.visualstudio.com/content/problem/519499/could-not-copy-the-file-objx64debugmanagementexe-b.html it helps to unload and reload the project. It helped for me.

Build fails with Could not copy the file.. because it was not found in Visual Studio 2013

Uninstalling the "Productivity Power Tools" extension in Visual Studio 2013, restarting Visual Studio and rebuilding did it for me. I found this workaround here:

https://connect.microsoft.com/VisualStudio/feedback/details/533411

Opentap Could not copy [name].dll to bin\Debug\Dependencies\[Name].dll . Exceeded retry count of 10. Failed

Just for everyone who is interested what is the solution.

The problem with I hade was, that Visual Studio has problems to solve the dependencies. Due to an test I tried to recreate an project on the same path and moved the old project to my desktop. Than to look at the code I opened the old project and after that it worked.

Solution

Visual Studio is not able to solve the dependencies when the path is to long. Now I have changed the path and it works.



Related Topics



Leave a reply



Submit