Unable to copy file - access to the path is denied

后端 未结 30 1222
死守一世寂寞
死守一世寂寞 2020-11-30 19:05

I am using Visual Studio 2005. After taking code from version control first, the c#.net application runs correctly. But, after doing some modifications, when I build I am

30条回答
  •  萌比男神i
    2020-11-30 19:47

    I use Visual Studio 2013. I faced this problem 2 times:

    1. On first occasion, I was running Visual Studio without Administrator rights. So, I closed VS and started it using 'Run as administrator' option. This solved my problem.

    2. On second occasion, I restarted VS many times, every time making sure that I am running it as an administrator. Also, I rebuilt solution many times. But, in spite of that I was getting error. After that, I removed the concerned file from the target location (the file was already present may be from the previous build at the location where it tries to copy to) and rebuilt the solution. After that, error went away and everything ran smoothly!

提交回复
热议问题