Saturday, November 13, 2010

unable to copy file access to the path is denied

In visual studio while building on application you might get the following error.

unable to copy file ' c://xxx/xxx...' access to the 'D://xx/xxx..' path is denied.

The reason behind this is the current file is in read only mode.

You just do the following steps, then the problem will resolve.

  • Go to the file copying file location or pasted location(In case if it is pasted and giving error) .
  • Right click on that file a context menu will be open.
  • Select properties.
  • A new window will open with General tab.
  • Under the general tab if Read only Permission is checked, just uncheck it.
  • Now build the application. The build will succeed.

7 comments:

  1. This is the real solution to this problem. Thank you so much!

    ReplyDelete
  2. Orly? Actually, you can still get this error when the file is writable.

    ReplyDelete
  3. Really glad that I saw this post- I was getting very frustrated with a SSRS project that suffered from this problem.

    ReplyDelete
  4. This solution is fine in the Visual Studio IDE, but we're also getting it on he Build machine. Happens at random, but out of every 5 builds it will happen once. We have more builds than that running every evening, so every night we have to run at least one of them again. Ideas?

    ReplyDelete
  5. Thanks a lot, this is the real solution

    ReplyDelete