Share this article

This article is translated in

Improve this guide

MicrosoftSecurityApp.exe Bad Image: Error 0xc0e90002 [Fix]

Get rid of any additional app installations

4 min. read

Updated onApril 2, 2024

updated onApril 2, 2024

Share this article

This article is translated in

Improve this guide

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

Key notes

Many users reported getting aMicrosoftSecurityApp.exe– Bad Image error, where it states that theSystem.Xml.Linq.ni.dllfile is either not designed to run on Windows or it contains an error.

The error message appears before signing into the PC and is encountered on Windows 11. Even with the error, other apps and processes, both built-in and third-party, continue to run fine.

What is a Bad Image error?

A Bad Image error appears when the files required to run the program are missing or corrupted. Besides, the problem also arises when other apps conflict with the program or access the same set of shared files simultaneously.

How do I fix theMicrosoftSecurityApp.exeBad Image error?

How do I fix theMicrosoftSecurityApp.exeBad Image error?

Before we start with the slightly complex solutions, try these quick ones:

1. Uninstall the other Microsoft Defender app

The most common reason you get theBad Image erroris due to the presence of multiple instances of the built-in antivirus, Windows Security/Microsoft Defender, existing on the PC. So,uninstall the app, and things should be up and running!

2. Repair the corrupt system files

You will need torepair the corrupt system filesin order to fix theMicrosoftSecurityApp.exeBad Image error. So,run the DISM commandsand SFC scan, and the two will automatically replace all problematic system files with their cached copy.

3. Replace the problematic DLL

If it’s the DLL file to blame, you can replace it with another copy from a healthy PC with the same configuration.

Copy theSystem.Xml.Linq.ni.dllfile to a USB drive on the other computer, and then paste it in the following path on the affected PC after deleting the existing version:C:\Windows\assembly\Nativeimages_v4.0.30319_64\System.Xml.Linq\a3c635436ca5e274374c4389b2f1132d\

An easier fix is to use aneffective DLL repair toolbecause it can proceed with this action automatically and spare you further errors.

4. Switch out of S Mode

A few who faced the Bad ImageError Status 0xc0e90002with Microsoft Office or other third-party apps fixed it byswitching out of S Mode, a slightly restrictive OS environment with enhanced security and speed. So, you may try that!

5. Perform an in-place upgrade

After the in-place upgrade, you shouldn’t encounter theMicrosoftSecurityApp.exeBad Image error anymore. Remember, this is as good asreinstalling Windows. It will re-download all the critical system files, DLLs, and other built-in components but won’t affect the stored data.

Once you have fixed things, make sure no otherDLLs are missingto prevent any app from throwing similar errors.

For any queries or to share what worked for you, drop a comment below.

More about the topics:bad image error

Kazim Ali Alvi

Windows Hardware Expert

Kazim has always been fond of technology, be it scrolling through the settings on his iPhone, Android device, or Windows PC. He’s specialized in hardware devices, always ready to remove a screw or two to find out the real cause of a problem.

Long-time Windows user, Kazim is ready to provide a solution for your every software & hardware error on Windows 11, Windows 10 and any previous iteration. He’s also one of our experts in Networking & Security.

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Kazim Ali Alvi

Windows Hardware Expert

Kazim is specialized in hardware devices, always ready to remove a screw or two to find out the real cause of a problem.

Reviewed byAlex Serban