# BadImageFormatException

**URL:** <https://qa.fmod.com/t/badimageformatexception/24523>\
**Category:** FMOD Engine\
**Tags:** csharp\
**Created:** [September 22, 2026, 8:56am UTC](https://qa.fmod.com/t/badimageformatexception/24523 "2026-09-22T08:56:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hyp-X](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Hyp-X](https://qa.fmod.com/u/Hyp-X)\
**Post date:** [September 22, 2026, 8:56am UTC](https://qa.fmod.com/t/badimageformatexception/24523/1 "2026-09-22T08:56:33Z")

</div>

Hi,

I’m using the C# API from fmodstudioapi20314win-installer.exe  
The application is 64-bit / Windows.

Debug version works fine loading fmodstudioL.dll and fmodL.dll  
Release version fails to load fmodstudio.dll with:

`System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)`  
`at FMOD.Studio.System.FMOD_Studio_System_Create(IntPtr& system, UInt32 headerversion)`  
`at FMOD.Studio.System.create(System& system)`

I double checked that I copied the right files:  
`"c:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x64\fmodstudio.dll"`  
`"c:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\lib\x64\fmod.dll"`

I also checked that the dll is 64-bit.

Is there anything I might do wrong here?

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [September 23, 2026, 1:45am UTC](https://qa.fmod.com/t/badimageformatexception/24523/2 "2026-09-23T01:45:55Z")

</div>

Hi,

Thanks for bringing this to our attention. We can use [dumpbin](https://learn.microsoft.com/en-us/cpp/build/reference/dumpbin-reference?view=msvc-170) to confirm the correct architecture

From

```auto
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64

```

(Or your install of Visual Studio)

Can you please run

```auto
.\dumpbin.exe /headers "C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\studio\lib\x64\fmodstudio.dll" | findstr machine

```

And share the output which should look like `8664 machine (x64).` If not, please remove the `| findstr machine` and share share the full output of the logs. If it is outputting the correct version, would it be possible to reinstall the engine can check if it is working as expected?

---

<div class="post-metadata">

**Author:** ![Hyp-X](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Hyp-X](https://qa.fmod.com/u/Hyp-X)\
**Post date:** [September 23, 2026, 12:23pm UTC](https://qa.fmod.com/t/badimageformatexception/24523/3 "2026-09-23T12:23:57Z")

</div>

Ok, it was totally an error on my part.

The C# wrapper assembly I put together was called FMOD.csproj  
When loading the (correct) fmodstudio.dll it tried to load the managed FMOD.dll instead of the correct fmod.dll…

In the Debug version I used fmodL.dll and fmodstudioL.dll so there was no name collision there.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [September 24, 2026, 12:15am UTC](https://qa.fmod.com/t/badimageformatexception/24523/4 "2026-09-24T00:15:04Z")

</div>

Thank you for sharing the solution.
