Error Code 21: This could mean the redistributable is outdated or corrupted
What Causes Error Code 21?
Sonar needs Microsoft’s Visual C++ 2015–2022 Redistributable (x64) to work correctly. If that thing’s broken or outdated, Sonar won’t start and will give Error Code 21.
How Do I Fix It?
You can resolve the error in one of two ways:
Repair the Existing Redistributable
- Open Windows Settings
- Go to Apps > Installed Apps
- In the search bar, type: "redistributable"
- Locate Microsoft Visual C++ 2015-2022 Redistributable (x64)
- Click the three dots next to it and select Modify
- Choose Repair and follow the prompts
Install the Latest Version of Microsoft Visual
- Visit Microsoft’s official page:
- Download the latest version of the 2015–2022 Redistributable (x64)
- Run the installer and complete the setup
How Can I Prevent This Error in the Future?
To avoid this problem again, make sure Windows and all your software are up to date, and check for updates to the Microsoft Visual C++ Redistributable periodically.
GLHF!