0x80070020 🪟 Windows

0x80070020: The process cannot access the file because it is being used by another process

Another program has the file open (locked), so Windows can’t modify, delete or replace it.

Seen on: Windows

Meaning

ERROR_SHARING_VIOLATION. Antivirus scanning, backup/sync tools (OneDrive), IDEs, servers (IIS, dev servers) or Explorer previews keep files open. During updates, security software is a common cause.

Common causes

  • File open in another application or service
  • Antivirus/OneDrive/indexer scanning the file
  • A previous instance of your program still running
  • IIS/dev server holding DLLs

⚡ Quick fix

  1. Find the locking process (Resource Monitor → CPU → Associated Handles, or handle.exe)
  2. Close it or stop the service
  3. Exclude build folders from antivirus/sync

Detailed fix by platform

Windows

  1. powershell
    handle64.exe C:\path\to\file.dll
    Get-Process | Where-Object { $_.Modules.FileName -like '*file.dll' }

How to diagnose

  1. Locker — Which process holds a handle?
  2. Timing — During build/update/backup?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.