The message identifies a damaged Phone Link package file (LibNanoAPI.dll), so repair Phone Link first and reinstall it only if repair/reset does not clear the 0xc000012f error.
1. Repair Phone Link
- Press Ctrl + Shift + Esc to open Task Manager.
- Find Phone Link, right-click it, and select End task.
- Open Start → Settings → Apps → Installed apps.
- Find Phone Link, select the three dots → Advanced options.
- Select Repair.
- Open Phone Link again.
Repair preserves the app’s data. If the same Bad Image dialog appears, return to Advanced options and select Reset. You may then need to sign in and link the phone again. Repair and reset are the supported recovery options for a malfunctioning Windows app.^1^
2. Update or reinstall Phone Link
If resetting does not work:
- Open Microsoft Store → Library → Get updates.
- Install any update shown for Phone Link, and restart Windows.
- If the error remains, return to Settings → Apps → Installed apps → Phone Link and select Uninstall, if available.
- Open Microsoft Store, search for Phone Link, and install it again.
Microsoft recommends updating Store apps and reinstalling an app from the Store Library when repair/reset does not resolve the problem.^2^
If Uninstall is unavailable, use the Store’s Library page to locate and reinstall/update Phone Link rather than manually deleting anything under C:\Program Files\WindowsApps. Do not change permissions or delete LibNanoAPI.dll manually.
3. Repair Windows components if 0xc000012f remains
If a fresh Phone Link installation produces the same Bad Image message, repair the Windows component store and protected system files:
- Search for Command Prompt.
- Right-click it and select Run as administrator.
- Run these commands in this order:
DISM.exe /Online /Cleanup-Image /RestoreHealth
sfc /scannow
- Wait for each command to finish completely.
- Restart the PC and test Phone Link.
DISM repairs the Windows image/component store; SFC then scans and repairs protected system files. Microsoft’s procedure uses this order and requires administrator access.^3^
If DISM reports that the repair failed, or SFC says it could not repair some files, provide the exact final message from both commands. That result determines whether an additional Windows repair installation is needed.
References
- [Windows 11](https://support.microsoft.com/windows/deployment/install-upgrade/fix-problems-that-block-programs-from-being-installed-or-removed#summary)
- Fix problems with apps from Microsoft Store
- [Windows 11](https://support.microsoft.com/windows/deployment/updates-lifecycle/troubleshoot-problems-updating-windows#repair-hard-drive-errors)