0

I am trying to call invokemethod to delete a file in the drop folder. However I am receiving access to the path is denied message. I am also doing copydirectories and delete directory before using invokmethod. Both copy and delete directories work with no permission issue. I am guessing invokemethod use different user account. Any help is very much appreciated.

samuelsoe
  • 11
  • 2

2 Answers2

0

By default the build agent runs with the build service account of Network Service. You may want to change it to a domain account such as TFSBuild so you could assign write permissions on the paths you need your build artifacts.

Then make sure TFSBuild is running the build service and is a member of the Project Collection Build Service Accounts

enter image description here

KMoraz
  • 14,004
  • 3
  • 49
  • 82
0

You will also get access denied error, when you have the file in use.

Jehan33
  • 3,780
  • 2
  • 21
  • 16