Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Since I've used my 240 Minutes off a free hosted agent, I decided to set a private one up on my machine.

I pretty much just used the FAQ to set up the Agent and install it was a Windows Service running under my account: enter image description here

Unfortunately, whenever I queue a build, I get the following ere:

Downloading task: NuGetCommand The process cannot access the file 'C:Usersmatthias.muellerDesktopStuffPrivatAgent\_work\_tasksNuGetCommand_333b11bd-d341-40d9-afcf-b32d5ce6f23b2.0.24 ode_modules uget-task-commonNuGetCredentialProviderNewtonsoft.Json.dll' because it is being used by another process.

I checked and deleted this folder and even wrote a small program, which checks, who is locking this file. But interesting enough, outside of the build process nobody is locking it, so it seems like it is the process itself having a problem?

To be fair, I cant tell much more, since I tried to run the service under several users and also googled similar problems, but I couldn't find anything regarding the lock of certain files. I also restarted the PC, stopped all programs and processes etc., but nothing helped.

Are there some known problems regarding the lock of files?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
177 views
Welcome To Ask or Share your Answers For Others

1 Answer

Please troubleshooting the issue with below aspects:

  1. detect files and folders in use

    You can use the tool like Proess Monitor or Process Explorer etc.

  2. Anti-virus exclusion

If you are using MSBuild during your build, please also check with below aspects:

  1. MSBuild and /nodeReuse:false
  2. MSBuild and /maxcpucount:[n]

More details, you can refer File- and folder-in-use errors.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...