The project is busy
wkl-office ends with exit code 10 and error: another run works on this project (<holder>); try again when it has finished., dotnet build fails with error WKL010 and the same text, or an operation of the Access add-in shows
waiting for <holder> in the tab Project of the work area.
With a machine lock (--lock-file or WKL_ACCESS_LOCK_FILE) the message is
The machine lock <file> is still held after <n> s: <holder>. Nothing was done; ..., from dotnet build
WKL010: The machine lock <file> is still held: <holder>., and the add-in shows machine lock <file>: <holder>.
Environment
WKL Office SDK 0.2.0 and later: every command that writes (listed under “One run at a time per project” in the command-line reference), the MSBuild tasks and the Access add-in.
Cause
Two runs on one project would replace the same database or write the same sources at the same time. Every run that
writes therefore holds the file obj/wkl-sdk.lock next to the project file while it works. The holder in the message
names who has it: process id, program (wkl-office.exe, dotnet.exe, MSACCESS.EXE), command or operation, and since
when. Typical holders:
- an operation of the add-in in an Access that has a database of the project open (
MSACCESS.EXE ... Access add-in Validate); - a
dotnet buildstarted by an editor in the background; - a second terminal running
wkl-office.
The machine lock is the same for a whole computer: one file all participants agreed on (command-line reference). Its holder may be a run of the SDK in another project or session, or another tool, such as a test script, that created the file itself.
Resolution
- Wait until the named run has finished, then start again. The add-in does this by itself: its operation starts as soon as the project is free.
- If the run is not wanted, end it where it was started: Cancel in the add-in, Ctrl+C in the terminal, Stop in the editor.
- If the process id in the message no longer exists, the lock is already free: the operating system releases it when the process ends, also when it was killed. Start again; the file
obj/wkl-sdk.lockmay stay and needs no cleaning. - Machine lock: a file the SDK created disappears with its run, also when the run was killed. A file that stays was created by another tool; ask its holder (line
holder:) or end that tool. Delete the file only when you are sure that no run holds the computer. To wait longer instead of failing, raise--lock-wait.
Related topics
- How to: Use the Access add-in (operations, Cancel, Take back)