Skip to Content

Archive - Jun 15, 2010

Date
  • All
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

Can not copy... Visual Studio error.

A common problem with Visual Studio is that it leaves locks in place inappropriately after debugging. A quick search for

visual studio 2010 "unable to copy file"

will show how prevalent the problem is.

This workaround was suggested for building add-ins, but it works for WinForm applications as well: File Lock Issue in Visual Studio When Building a Project.

The basic idea is to add a few lines to your Pre-build event:

TeraCopy for Windows 7, 64 bit.

I was copying a large software project from one directory to another in preparation for upgrading the project files to Visual Studio 2010 format. The copy dragged on and on moving at just over 1MB/s with 1GB to copy. It completed in about 20-25 minutes, which was absurd.

Doing some Googling I found plenty of references to slow copy problems (something I had also encountered in Vista), but I also saw a reference to TeraCopy as a solution.