Fix ‘An attempt was made to load a program with an incorrect format’

By: Madeleine Dean
3 minute read

For various PC problems, we recommend this tool.

This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues now in 3 easy steps:

  1. Download this PC Repair Tool rated "Excellent" on TrustPilot.com.
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues with Patended Technologies (requires upgrade).

If you’re getting the ‘ERROR_BAD_FORMAT‘ error code 11 with the ‘An attempt was made to load a program with an incorrect format‘ description, follow the troubleshooting steps listed in this article to fix it.

ERROR_BAD_FORMAT: Background

The error “An attempt was made to load a program with an incorrect format” is quite a mysterious error code. There is not much information about it, except for various forum posts where users describe the problem.

The ‘ERROR_BAD_FORMAT‘ error code affects mainly Windows 7 machines, but sometimes it can also occur on Windows 10. It usually occurs when users try to launch an app or program on their Windows PCs or servers.

Error code 11 is often triggered by VS Redistributable package issues, incompatibility problems between programs, incorrect registry changes, etc.

How to fix error 10: ERROR_BAD_FORMAT

ERROR_BAD_FORMAT on .NET platforms

Solution 1 — Enable 32-bit compatibility

Users report that this error mainly occurs due to DLL incompatibility issues triggered by apps running in Visual Studio installed on 64-bit operating systems with the value TargetCPU = Any CPU. In other words, apps try to load DLLs built for 32-bit platforms on x64 computers, and vice versa.

To fix this problem, you need to configure the utility to run as a 32-bit .NET process using CORFLAGS.

  1. Download CORFLAGS from Microsoft’s Support page
  2. Run it as follows to switch the 32-bit execution mode on: corflags utility.exe /32Bit+
  3. Use /32Bit- in the above command line to turn it off.

You can also enable 32-bit compatibility in the Windows form application. Simply right-click on Project > go to Properties > Build > check Prefer 32-bit.

Additionally, you can also use the “Any CPU” option, and use a dedicated code to identify which DLL to use. In this manner, you will use one assembly to handle both 32-bit and 64-bit platforms. Here is the code to use:

if (Environment.Is64BitProcess)
{
//call MiniDumpWriteDump
}
else
{
//call MiniDumpWriteDumpX86
}

You can also use preprocessor conditions, but in this case you need to compile two different assemblies. In other words, compile a 32-bit assembly for 32-bit platforms, and a separate 64-bit assembly for 64-bit platforms.

Solution 2 — Install the correct VS Redistributable Package

Your target PC might not have the appropriate VS Redistributable Package installed. Go to Microsoft’s webpage and install the appropriate VS Redistributable Package version on your system.


For various PC problems, we recommend this tool.

This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues now in 3 easy steps:

  1. Download this PC Repair Tool rated "Excellent" on TrustPilot.com.
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues with Patended Technologies (requires upgrade).

Fix ERROR_BAD_FORMAT on Windows 10

On Windows 10, the ‘An attempt was made to load a program with an incorrect format’ error usually occurs on startup and is due to software incompatibility issues. Users confirm that this problem often occurs when using Start Menu replacement tools.

If you’re using a Windows 10 Start menu replacement, uninstall it and that should do the trick.

Also, don’t forget to repair your registry. The simplest way to repair your registry is to use a dedicated tool, such as CCleaner. Don’t forget to first backup your registry in case anything goes wrong. If you haven’t installed any registry cleaner on your computer, check out our article on the best registry cleaners to use on Windows 10 PCs.

You can also use Microsoft’s System File Checker to check for system file corruption. Here’s how to run an SFC scan:

1. Go to Start > type cmd > right-click Command Prompt > select Run as Administrator

2. Now type the sfc /scannow command

3. Wait for the scanning process to complete and then restart your computer. All corrupted files will be replaced on reboot.

We hope that the solutions listed above helped you fix the  ‘ERROR_BAD_FORMAT‘ error code 10. As always, if you’ve come across other solutions to fix this problem, you can list the troubleshooting steps in the comments below.

RELATED STORIES YOU NEED TO CHECK OUT:

For various PC problems, we recommend this tool.

This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues now in 3 easy steps:

  1. Download this PC Repair Tool rated "Excellent" on TrustPilot.com.
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues with Patended Technologies (requires upgrade).

Next up

Best Windows 10 antivirus software to use in 2018

By: Radu Tyrsina
7 minute read

Update – 2018 will soon come to an end and we already have a guide on what is the best antivirus you should get in […]

Continue Reading

These features are out for good with Windows 10 version 1809

iamsovy@gmail.com' By: Sovan Mandal
2 minute read

Microsoft is all set to launch its next big update, Windows 10 version 1809 in October. While that should be a nice piece of news […]

Continue Reading

Windows 10 18H2 builds no longer receive new features

By: Matthew Adams
3 minute read

The Windows 10 October 2018 Update (otherwise 18H2) rollout might now be two to three weeks away. For the last few months, new build previews […]

Continue Reading

Discussions