# Quartz Unit Test Lock Recovery

> Recover from CS2012 DLL lock failures when running Quartz unit tests Use when this capability is needed.

- Skill: `tomevault-io/quartz-unit-test-lock-recovery` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/quartz-unit-test-lock-recovery`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/quartz-unit-test-lock-recovery/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/quartz-unit-test-lock-recovery

---


## Context
On Windows, `dotnet test src\Quartz.Tests.Unit\Quartz.Tests.Unit.csproj` may fail with CS2012 before tests run because `artifacts\obj\Quartz.Tests.Unit\debug\Quartz.Tests.Unit.dll` is locked by a lingering `VBCSCompiler` process.

## Pattern
1. Capture locking PID from CS2012 output.
2. Stop only that PID (`Stop-Process -Id <PID> -Force`).
3. Rerun tests with shared compilation disabled and single-node execution:
   `dotnet test src\Quartz.Tests.Unit\Quartz.Tests.Unit.csproj -m:1 /p:UseSharedCompilation=false`

## Expected Outcome
Build succeeds and tests execute normally; if failures remain, then they are likely real test/product failures.

---
> Source: [quartznet/quartznet](https://github.com/quartznet/quartznet) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-22 -->

