Documenter.jl build "resource busy or locked" workaround

After building docs from Documenter.jl for my project in Windows, for some reason there are always two processes cmd.exe and gksqt.exe that remain alive with locks on one of the subdirectories in docs/build/. As a result, I can’t build docs again without opening resmon, searching processes for the problem file handle, and manually killing them.

This is a known issue on and off in Documenter.jl. For some, the problem resolved itself after a Julia update:

And for others, the issue could be traced to VSCode, so it wasn’t really Documenter.jl’s problem:

I don’t know who to “blame” for the issue, but I am just curious if anyone has found a workaround that is better than what I am doing in resmon. I have taken to just running killall cmd.exe && killall qksqt.exe after each build, but for obvious reasons I can’t recommend this approach to others.

I started learning Documenter.jl two days ago and got really confused, I get this error several times in a row and couldn’t understand what I am doing wrong. I am not used to using multiple packages and don’t know how they work (you do “activate docs” at some point) which itself was not connected but was already introducing some difficulties and then I got it.

The first time, I opened the .html in build in my browser (Firefox) and recompiled make.jl multiple times and just refreshed the site locally without problems. Then I got the error and I had to completely close Firefox (not just the tab).

Then I tried it in Edge and it worked again for a while without having to close it but I also started having the error. But closing the browser completely fixes it for me.