Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
178 views
in Technique[技术] by (71.8m points)

azure devops - VSTS Private hosted agent locking himself out

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

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

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...