Troubleshooting BadImageFormatException












87















I have a Windows service written in C# using Visual Studio 2010 and targeting the full .NET Framework 4. When I run from a Debug build the service runs as expected. However, when I run it from a Release build I get a System.BadImageFormatException (details below). I've been searching the internet for a solution but so far every thing I've found hasn't helped me find a solution.



The problem exists on both Windows 7 64-bit (dev) and Windows XP SP3 32-bit (target) systems.



Here is what I've tried so far:




  • Verified build settings such as Platform Target are all the same (x86).

  • Used peverify with the /verbose option to ensure the assembly binaries were valid.

  • Uses fuslogvw to look for any loading issues.

  • Used CheckAsm to look for missing files or assembiles.


All of these checks didn't change anything. I've included the full text of the exception information below, with some of the names changed to protect the secrets of my corporate masters.




System.BadImageFormatException was unhandled
Message=Could not load file or assembly 'XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=XxxDevicesService
FileName=XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
FusionLog=Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64v4.0.30319clr.dll
Running under executable c:DevTeamEbinReleaseXxxDevicesService.vshost.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = XXX
LOG: DisplayName = XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///c:/Dev/TeamE/bin/Release/
LOG: Initial PrivatePath = NULL
Calling assembly : XxxDevicesService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:TeamEbinReleaseXxxDevicesService.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///c:/TeamE/bin/Release/XxxDevices.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

StackTrace:
at XxxDevicesService.Program.Main(String args)
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:









share|improve this question























  • What is xxxDevices?

    – Keith Nicholas
    Jan 25 '12 at 1:10











  • are you mixing native code / .net at all?

    – Keith Nicholas
    Jan 25 '12 at 1:11






  • 1





    You are on the right track that this exception is associated with x86/x64 bit differences. I assume this is not a web application right? Also, what type of assembly is XxxDevicesService? Is it compiled for a specific platform (e.g. 32 bit)? If so, then you must compile your platform to 32 bit.

    – Reddog
    Jan 25 '12 at 1:14











  • support.microsoft.com/en-us/kb/967163

    – Palec
    Dec 1 '15 at 9:29
















87















I have a Windows service written in C# using Visual Studio 2010 and targeting the full .NET Framework 4. When I run from a Debug build the service runs as expected. However, when I run it from a Release build I get a System.BadImageFormatException (details below). I've been searching the internet for a solution but so far every thing I've found hasn't helped me find a solution.



The problem exists on both Windows 7 64-bit (dev) and Windows XP SP3 32-bit (target) systems.



Here is what I've tried so far:




  • Verified build settings such as Platform Target are all the same (x86).

  • Used peverify with the /verbose option to ensure the assembly binaries were valid.

  • Uses fuslogvw to look for any loading issues.

  • Used CheckAsm to look for missing files or assembiles.


All of these checks didn't change anything. I've included the full text of the exception information below, with some of the names changed to protect the secrets of my corporate masters.




System.BadImageFormatException was unhandled
Message=Could not load file or assembly 'XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=XxxDevicesService
FileName=XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
FusionLog=Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64v4.0.30319clr.dll
Running under executable c:DevTeamEbinReleaseXxxDevicesService.vshost.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = XXX
LOG: DisplayName = XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///c:/Dev/TeamE/bin/Release/
LOG: Initial PrivatePath = NULL
Calling assembly : XxxDevicesService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:TeamEbinReleaseXxxDevicesService.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///c:/TeamE/bin/Release/XxxDevices.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

StackTrace:
at XxxDevicesService.Program.Main(String args)
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:









share|improve this question























  • What is xxxDevices?

    – Keith Nicholas
    Jan 25 '12 at 1:10











  • are you mixing native code / .net at all?

    – Keith Nicholas
    Jan 25 '12 at 1:11






  • 1





    You are on the right track that this exception is associated with x86/x64 bit differences. I assume this is not a web application right? Also, what type of assembly is XxxDevicesService? Is it compiled for a specific platform (e.g. 32 bit)? If so, then you must compile your platform to 32 bit.

    – Reddog
    Jan 25 '12 at 1:14











  • support.microsoft.com/en-us/kb/967163

    – Palec
    Dec 1 '15 at 9:29














87












87








87


19






I have a Windows service written in C# using Visual Studio 2010 and targeting the full .NET Framework 4. When I run from a Debug build the service runs as expected. However, when I run it from a Release build I get a System.BadImageFormatException (details below). I've been searching the internet for a solution but so far every thing I've found hasn't helped me find a solution.



The problem exists on both Windows 7 64-bit (dev) and Windows XP SP3 32-bit (target) systems.



Here is what I've tried so far:




  • Verified build settings such as Platform Target are all the same (x86).

  • Used peverify with the /verbose option to ensure the assembly binaries were valid.

  • Uses fuslogvw to look for any loading issues.

  • Used CheckAsm to look for missing files or assembiles.


All of these checks didn't change anything. I've included the full text of the exception information below, with some of the names changed to protect the secrets of my corporate masters.




System.BadImageFormatException was unhandled
Message=Could not load file or assembly 'XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=XxxDevicesService
FileName=XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
FusionLog=Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64v4.0.30319clr.dll
Running under executable c:DevTeamEbinReleaseXxxDevicesService.vshost.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = XXX
LOG: DisplayName = XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///c:/Dev/TeamE/bin/Release/
LOG: Initial PrivatePath = NULL
Calling assembly : XxxDevicesService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:TeamEbinReleaseXxxDevicesService.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///c:/TeamE/bin/Release/XxxDevices.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

StackTrace:
at XxxDevicesService.Program.Main(String args)
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:









share|improve this question














I have a Windows service written in C# using Visual Studio 2010 and targeting the full .NET Framework 4. When I run from a Debug build the service runs as expected. However, when I run it from a Release build I get a System.BadImageFormatException (details below). I've been searching the internet for a solution but so far every thing I've found hasn't helped me find a solution.



The problem exists on both Windows 7 64-bit (dev) and Windows XP SP3 32-bit (target) systems.



Here is what I've tried so far:




  • Verified build settings such as Platform Target are all the same (x86).

  • Used peverify with the /verbose option to ensure the assembly binaries were valid.

  • Uses fuslogvw to look for any loading issues.

  • Used CheckAsm to look for missing files or assembiles.


All of these checks didn't change anything. I've included the full text of the exception information below, with some of the names changed to protect the secrets of my corporate masters.




System.BadImageFormatException was unhandled
Message=Could not load file or assembly 'XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=XxxDevicesService
FileName=XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
FusionLog=Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64v4.0.30319clr.dll
Running under executable c:DevTeamEbinReleaseXxxDevicesService.vshost.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = XXX
LOG: DisplayName = XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///c:/Dev/TeamE/bin/Release/
LOG: Initial PrivatePath = NULL
Calling assembly : XxxDevicesService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:TeamEbinReleaseXxxDevicesService.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///c:/TeamE/bin/Release/XxxDevices.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

StackTrace:
at XxxDevicesService.Program.Main(String args)
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:






c# .net exception






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 25 '12 at 1:07







user10256




















  • What is xxxDevices?

    – Keith Nicholas
    Jan 25 '12 at 1:10











  • are you mixing native code / .net at all?

    – Keith Nicholas
    Jan 25 '12 at 1:11






  • 1





    You are on the right track that this exception is associated with x86/x64 bit differences. I assume this is not a web application right? Also, what type of assembly is XxxDevicesService? Is it compiled for a specific platform (e.g. 32 bit)? If so, then you must compile your platform to 32 bit.

    – Reddog
    Jan 25 '12 at 1:14











  • support.microsoft.com/en-us/kb/967163

    – Palec
    Dec 1 '15 at 9:29



















  • What is xxxDevices?

    – Keith Nicholas
    Jan 25 '12 at 1:10











  • are you mixing native code / .net at all?

    – Keith Nicholas
    Jan 25 '12 at 1:11






  • 1





    You are on the right track that this exception is associated with x86/x64 bit differences. I assume this is not a web application right? Also, what type of assembly is XxxDevicesService? Is it compiled for a specific platform (e.g. 32 bit)? If so, then you must compile your platform to 32 bit.

    – Reddog
    Jan 25 '12 at 1:14











  • support.microsoft.com/en-us/kb/967163

    – Palec
    Dec 1 '15 at 9:29

















What is xxxDevices?

– Keith Nicholas
Jan 25 '12 at 1:10





What is xxxDevices?

– Keith Nicholas
Jan 25 '12 at 1:10













are you mixing native code / .net at all?

– Keith Nicholas
Jan 25 '12 at 1:11





are you mixing native code / .net at all?

– Keith Nicholas
Jan 25 '12 at 1:11




1




1





You are on the right track that this exception is associated with x86/x64 bit differences. I assume this is not a web application right? Also, what type of assembly is XxxDevicesService? Is it compiled for a specific platform (e.g. 32 bit)? If so, then you must compile your platform to 32 bit.

– Reddog
Jan 25 '12 at 1:14





You are on the right track that this exception is associated with x86/x64 bit differences. I assume this is not a web application right? Also, what type of assembly is XxxDevicesService? Is it compiled for a specific platform (e.g. 32 bit)? If so, then you must compile your platform to 32 bit.

– Reddog
Jan 25 '12 at 1:14













support.microsoft.com/en-us/kb/967163

– Palec
Dec 1 '15 at 9:29





support.microsoft.com/en-us/kb/967163

– Palec
Dec 1 '15 at 9:29












17 Answers
17






active

oldest

votes


















110















Verified build settings such as Platform Target are all the same (x86).




That's not what the crash log says:




Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64




Note the 64 in the name, that's the home of the 64-bit version of the framework. Set the Target platform setting on your EXE project, not your class library project. The XxxDevicesService EXE project determines the bitness of the process.






share|improve this answer



















  • 6





    And while you're checking the EXE project- check both Debug and Release. :/

    – chris
    Aug 2 '16 at 15:13



















32














After I stopped banging my head on the desk thinking of the entire week I spent running down this problem, I am sharing what worked for me. I have Win7 64 bit, 32-bit Oracle Client, and have my MVC 5 project set to run on x86 platform because of the Oracle bitness. I kept getting the same errors:




Could not load file or assembly 'Oracle.DataAccess' or one of its
dependencies. An attempt was made to load a program with an incorrect
format.




I reloaded the NuGet packages, I used copies of the DLLs that worked for others in different apps, I set the codebase in the dependent assembly to point to my project's bin folder, I tried CopyLocal as true or false, I tried everything.
Finally I had enough else done I wanted to check in my code, and as a new contractor I didn't have subversion set up. While looking for a way to hook it into VS, I tripped over the answer.
What I found worked was unchecking the "Use the 64 bit version of IIS Express for Web Sites and Projects" option under the Projects and Solutions => Web Projects section under the Tools=>Options menu.






share|improve this answer
























  • Thanks this solved an issue with pdfium for me!

    – Akinzekeel
    Apr 18 '16 at 11:41






  • 2





    What a life saver!! Thank you. For me I had to actually check this, since my project is effectively x64. Thanks again!!!

    – viper
    Oct 17 '16 at 14:14











  • After all the help I have received here, I am very glad to have been able to pay some of it forward!

    – Joseph Morgan
    Oct 20 '16 at 23:06






  • 2





    For those using Local IIS, make sure your app pool's "Enable 32-Bit Applications" (under Advanced Settings) is set to True.

    – Eric Eskildsen
    Mar 15 '17 at 18:46











  • An addenum to @EricEskildsen's comment above about "enable 32-bit applications" in the application pool, even if you don't want to do that in the live environment, flipping that switch can provide additional clues as to whether you are facing a 32-bit/64-bit problem or something else.

    – a CVn
    Mar 16 '17 at 8:11



















13














What I found worked was checking the "Use the 64 bit version of IIS Express for Web Sites and Projects" option under the Projects and Solutions => Web Projects section under the Tools=>Options menu.






share|improve this answer
























  • THANK YOU!!! I've been struggling with this for an hour now. :)

    – vsdev
    Jun 20 '18 at 8:53











  • you are the savior. +1

    – Amit Kumar
    Sep 3 '18 at 9:32





















11














It can typically occur when you changed the target framework of .csproj and reverted it back to what you started with.



Make sure 1 if supportedRuntime version="a different runtime from cs project target" under startup tag in app.config.



Make sure 2 That also means checking other autogenerated or other files in may be properties folder to see if there is no more runtime mismatch between these files and one that is defined in .csproj file.



These might just save you lot of time before you start trying different things with project properties to overcome the error.






share|improve this answer
























  • I came across a similar problem and your answer was the solution for mine. My app.config had different supported runtime.

    – Krisztián Kis
    Sep 22 '15 at 8:36



















7














I had the same problem even though I have 64-bit Windows 7 and i was loading a 64bit DLL b/c in Project properties | Build I had "Prefer 32-bit" checked. (Don't know why that's set by default). Once I unchecked that, everything ran fine






share|improve this answer
























  • Same here. This did the trick. Referenced a 64-bit assembly and the active build configuration was set to Any CPU but because of this "prefer 32-bit" setting assumably 32-bit was used running the application and caused the troubles.

    – Bernoulli IT
    Jun 30 '16 at 11:49



















7














You can also get this exception when your application target .NET Framework 4.5 (for example) and you have the following app.config :



<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v2.0.50727" />
<supportedRuntime version="v4.0" />
</startup>
</configuration>


When trying to launch the debug of the application you will get the BadImageFormatException.



Removing the line declaring the v2.0 version will clear the error.



I had this issue recently when I tried to change the target platform from an old .NET 2.0 project to .NET 4.5.






share|improve this answer































    5














    Background



    We started getting this today when we switched our WCF service from AnyCPU to x64 on a Windows 2012 R2 server running IIS 6.2.



    First we checked the only referenced assembly 10 times, to ensure it was not actually an x86 dll. Next we checked the application pool many times to ensure it was not enabling 32 bit applications.



    On a whim I tried toggling the setting. It turns out the application pools in IIS were defaulting to an Enable 32-Bit Applications value of False, but IIS was ignoring it on our server for some reason and always ran our service in x86 mode.



    Solution




    • Select the app pool.

    • Choose Set Application Pool Defaults... or Advanced Settings....

    • Change Enable 32-Bit Applications to True.

    • Click OK.

    • Choose Set Application Pool Defaults... or Advanced Settings... again.

    • Change Enable 32-Bit Applications back to False.

    • Click OK.






    share|improve this answer































      4














      For anyone who may arrive here at a later time....Nothing worked for me. All my assemblies were fine. I had an app config in one of my Visual Studio Projects that shouldn't have been there. So make sure your app config file is needed.



      I deleted the extra app config and it worked.






      share|improve this answer
























      • Fixed it for me. My App.config was setting my .NET 4.5.1 app to the 2.0 CLR!

        – Jared Thirsk
        May 19 '15 at 19:47



















      3














      I fixed this issue by changing the web app to use a different "Application Pool".






      share|improve this answer































        2














        Determine the application pool used by the application and set the property of by setting Enable 32 bit applications to True. This can be done through advance settings of the application pool.






        share|improve this answer































          1














          When building apps for 32-bit or 64-bit platform (My experience is with Visual Studio 2010), don't rely on the Configuration Manager to set the correct platform for the executable. Even if the CM has x86 selected for the application, check the project properties (Build tab): it might still say "Any CPU" there. And if you run an "Any CPU" executable on a 64-bit platform, it will run in 64-bit mode and refuse to load your accompanying DLLs that were built for the x86 platform.






          share|improve this answer































            0














            For anyone who may arrive here at a later time...

            For Desktop solution I got BadImageFormatException exception.

            All project's build options was fine (all x86). But StartUp project of solution was changed to some other project(class library project).



            Changing StartUp project to the original(.exe application project) was a solution in my case






            share|improve this answer































              0














              When I faced this issue the following solved it for me:



              I was calling a OpenCV dll from inside another exe, my dll did not contained the already needed opencv dlls like highgui, features2d, and etc available in the folder of my exe file. I copied all these to the directory of my exe project and it suddenly worked.






              share|improve this answer

































                0














                Remove your dependency on System.Runtime in your Web.Config, it worked for me:



                <dependentAssembly>
                <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
                </dependentAssembly>





                share|improve this answer

































                  0














                  This error "Could not load file or assembly 'example' or one of its dependencies. An attempt was made to load a program with an incorrect format" is typically caused by an incorrect application pool configuration.




                  1. Ensure that the AppPool your site is currently running on has "Enable 32-Bit Applications" set to False.

                  2. Ensure you are using the correct version for your platform.

                  3. If you are getting this error on a web site, ensure that your application pool is set to run in the correct mode (3.0 sites should run in 64 bit mode)

                  4. You should also make sure that the reference to that assembly in visual studio is pointing at the correct file in the packages folder.

                  5. Ensure you have the correct version of the dll installed in the GAC for 2.0 sites.

                  6. This can also be caused by WSODLibs being promoted with the web project.






                  share|improve this answer































                    0
















                    For .NET Core, there is a Visual Studio 2017 bug that can cause the project properties Build page to show the incorrect platform target. Once you discover that the problem is, the workarounds are pretty easy. You can change the target to some other value and then change it back.



                    Alternatively, you can add a runtime identifier to the .csproj. If you need your .exe to run as x86 so that it can load a x86 native DLL, add this element within a PropertyGroup:



                    <RuntimeIdentifier>win-x86</RuntimeIdentifier>


                    A good place to put this is right after the TargetFramework or TargetFrameworks element.






                    share|improve this answer































                      0














                      I am surprised that no-one else has mentioned this so I am sharing in case none of the above help (my case).



                      What was happening was that an VBCSCompiler.exe instance was somehow stuck and was in fact not releasing the file handles to allow new instances to correctly write the new files and was causing the issue. This became apparent when I tried to delete the "bin" folder and it was complaining that another process was using files in there.



                      Closed VS, opened task manager, looked and terminated all VBCSCompiler instances and deleted the "bin" folder to get back to where I was.



                      Reference: https://developercommunity.visualstudio.com/content/problem/117596/vbcscompilerexe-process-stays-runing-after-exiting.html






                      share|improve this answer

























                        Your Answer






                        StackExchange.ifUsing("editor", function () {
                        StackExchange.using("externalEditor", function () {
                        StackExchange.using("snippets", function () {
                        StackExchange.snippets.init();
                        });
                        });
                        }, "code-snippets");

                        StackExchange.ready(function() {
                        var channelOptions = {
                        tags: "".split(" "),
                        id: "1"
                        };
                        initTagRenderer("".split(" "), "".split(" "), channelOptions);

                        StackExchange.using("externalEditor", function() {
                        // Have to fire editor after snippets, if snippets enabled
                        if (StackExchange.settings.snippets.snippetsEnabled) {
                        StackExchange.using("snippets", function() {
                        createEditor();
                        });
                        }
                        else {
                        createEditor();
                        }
                        });

                        function createEditor() {
                        StackExchange.prepareEditor({
                        heartbeatType: 'answer',
                        autoActivateHeartbeat: false,
                        convertImagesToLinks: true,
                        noModals: true,
                        showLowRepImageUploadWarning: true,
                        reputationToPostImages: 10,
                        bindNavPrevention: true,
                        postfix: "",
                        imageUploader: {
                        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                        allowUrls: true
                        },
                        onDemand: true,
                        discardSelector: ".discard-answer"
                        ,immediatelyShowMarkdownHelp:true
                        });


                        }
                        });














                        draft saved

                        draft discarded


















                        StackExchange.ready(
                        function () {
                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f8996653%2ftroubleshooting-badimageformatexception%23new-answer', 'question_page');
                        }
                        );

                        Post as a guest















                        Required, but never shown
























                        17 Answers
                        17






                        active

                        oldest

                        votes








                        17 Answers
                        17






                        active

                        oldest

                        votes









                        active

                        oldest

                        votes






                        active

                        oldest

                        votes









                        110















                        Verified build settings such as Platform Target are all the same (x86).




                        That's not what the crash log says:




                        Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64




                        Note the 64 in the name, that's the home of the 64-bit version of the framework. Set the Target platform setting on your EXE project, not your class library project. The XxxDevicesService EXE project determines the bitness of the process.






                        share|improve this answer



















                        • 6





                          And while you're checking the EXE project- check both Debug and Release. :/

                          – chris
                          Aug 2 '16 at 15:13
















                        110















                        Verified build settings such as Platform Target are all the same (x86).




                        That's not what the crash log says:




                        Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64




                        Note the 64 in the name, that's the home of the 64-bit version of the framework. Set the Target platform setting on your EXE project, not your class library project. The XxxDevicesService EXE project determines the bitness of the process.






                        share|improve this answer



















                        • 6





                          And while you're checking the EXE project- check both Debug and Release. :/

                          – chris
                          Aug 2 '16 at 15:13














                        110












                        110








                        110








                        Verified build settings such as Platform Target are all the same (x86).




                        That's not what the crash log says:




                        Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64




                        Note the 64 in the name, that's the home of the 64-bit version of the framework. Set the Target platform setting on your EXE project, not your class library project. The XxxDevicesService EXE project determines the bitness of the process.






                        share|improve this answer














                        Verified build settings such as Platform Target are all the same (x86).




                        That's not what the crash log says:




                        Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64




                        Note the 64 in the name, that's the home of the 64-bit version of the framework. Set the Target platform setting on your EXE project, not your class library project. The XxxDevicesService EXE project determines the bitness of the process.







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Jan 25 '12 at 1:21









                        Hans PassantHans Passant

                        785k10612912061




                        785k10612912061








                        • 6





                          And while you're checking the EXE project- check both Debug and Release. :/

                          – chris
                          Aug 2 '16 at 15:13














                        • 6





                          And while you're checking the EXE project- check both Debug and Release. :/

                          – chris
                          Aug 2 '16 at 15:13








                        6




                        6





                        And while you're checking the EXE project- check both Debug and Release. :/

                        – chris
                        Aug 2 '16 at 15:13





                        And while you're checking the EXE project- check both Debug and Release. :/

                        – chris
                        Aug 2 '16 at 15:13













                        32














                        After I stopped banging my head on the desk thinking of the entire week I spent running down this problem, I am sharing what worked for me. I have Win7 64 bit, 32-bit Oracle Client, and have my MVC 5 project set to run on x86 platform because of the Oracle bitness. I kept getting the same errors:




                        Could not load file or assembly 'Oracle.DataAccess' or one of its
                        dependencies. An attempt was made to load a program with an incorrect
                        format.




                        I reloaded the NuGet packages, I used copies of the DLLs that worked for others in different apps, I set the codebase in the dependent assembly to point to my project's bin folder, I tried CopyLocal as true or false, I tried everything.
                        Finally I had enough else done I wanted to check in my code, and as a new contractor I didn't have subversion set up. While looking for a way to hook it into VS, I tripped over the answer.
                        What I found worked was unchecking the "Use the 64 bit version of IIS Express for Web Sites and Projects" option under the Projects and Solutions => Web Projects section under the Tools=>Options menu.






                        share|improve this answer
























                        • Thanks this solved an issue with pdfium for me!

                          – Akinzekeel
                          Apr 18 '16 at 11:41






                        • 2





                          What a life saver!! Thank you. For me I had to actually check this, since my project is effectively x64. Thanks again!!!

                          – viper
                          Oct 17 '16 at 14:14











                        • After all the help I have received here, I am very glad to have been able to pay some of it forward!

                          – Joseph Morgan
                          Oct 20 '16 at 23:06






                        • 2





                          For those using Local IIS, make sure your app pool's "Enable 32-Bit Applications" (under Advanced Settings) is set to True.

                          – Eric Eskildsen
                          Mar 15 '17 at 18:46











                        • An addenum to @EricEskildsen's comment above about "enable 32-bit applications" in the application pool, even if you don't want to do that in the live environment, flipping that switch can provide additional clues as to whether you are facing a 32-bit/64-bit problem or something else.

                          – a CVn
                          Mar 16 '17 at 8:11
















                        32














                        After I stopped banging my head on the desk thinking of the entire week I spent running down this problem, I am sharing what worked for me. I have Win7 64 bit, 32-bit Oracle Client, and have my MVC 5 project set to run on x86 platform because of the Oracle bitness. I kept getting the same errors:




                        Could not load file or assembly 'Oracle.DataAccess' or one of its
                        dependencies. An attempt was made to load a program with an incorrect
                        format.




                        I reloaded the NuGet packages, I used copies of the DLLs that worked for others in different apps, I set the codebase in the dependent assembly to point to my project's bin folder, I tried CopyLocal as true or false, I tried everything.
                        Finally I had enough else done I wanted to check in my code, and as a new contractor I didn't have subversion set up. While looking for a way to hook it into VS, I tripped over the answer.
                        What I found worked was unchecking the "Use the 64 bit version of IIS Express for Web Sites and Projects" option under the Projects and Solutions => Web Projects section under the Tools=>Options menu.






                        share|improve this answer
























                        • Thanks this solved an issue with pdfium for me!

                          – Akinzekeel
                          Apr 18 '16 at 11:41






                        • 2





                          What a life saver!! Thank you. For me I had to actually check this, since my project is effectively x64. Thanks again!!!

                          – viper
                          Oct 17 '16 at 14:14











                        • After all the help I have received here, I am very glad to have been able to pay some of it forward!

                          – Joseph Morgan
                          Oct 20 '16 at 23:06






                        • 2





                          For those using Local IIS, make sure your app pool's "Enable 32-Bit Applications" (under Advanced Settings) is set to True.

                          – Eric Eskildsen
                          Mar 15 '17 at 18:46











                        • An addenum to @EricEskildsen's comment above about "enable 32-bit applications" in the application pool, even if you don't want to do that in the live environment, flipping that switch can provide additional clues as to whether you are facing a 32-bit/64-bit problem or something else.

                          – a CVn
                          Mar 16 '17 at 8:11














                        32












                        32








                        32







                        After I stopped banging my head on the desk thinking of the entire week I spent running down this problem, I am sharing what worked for me. I have Win7 64 bit, 32-bit Oracle Client, and have my MVC 5 project set to run on x86 platform because of the Oracle bitness. I kept getting the same errors:




                        Could not load file or assembly 'Oracle.DataAccess' or one of its
                        dependencies. An attempt was made to load a program with an incorrect
                        format.




                        I reloaded the NuGet packages, I used copies of the DLLs that worked for others in different apps, I set the codebase in the dependent assembly to point to my project's bin folder, I tried CopyLocal as true or false, I tried everything.
                        Finally I had enough else done I wanted to check in my code, and as a new contractor I didn't have subversion set up. While looking for a way to hook it into VS, I tripped over the answer.
                        What I found worked was unchecking the "Use the 64 bit version of IIS Express for Web Sites and Projects" option under the Projects and Solutions => Web Projects section under the Tools=>Options menu.






                        share|improve this answer













                        After I stopped banging my head on the desk thinking of the entire week I spent running down this problem, I am sharing what worked for me. I have Win7 64 bit, 32-bit Oracle Client, and have my MVC 5 project set to run on x86 platform because of the Oracle bitness. I kept getting the same errors:




                        Could not load file or assembly 'Oracle.DataAccess' or one of its
                        dependencies. An attempt was made to load a program with an incorrect
                        format.




                        I reloaded the NuGet packages, I used copies of the DLLs that worked for others in different apps, I set the codebase in the dependent assembly to point to my project's bin folder, I tried CopyLocal as true or false, I tried everything.
                        Finally I had enough else done I wanted to check in my code, and as a new contractor I didn't have subversion set up. While looking for a way to hook it into VS, I tripped over the answer.
                        What I found worked was unchecking the "Use the 64 bit version of IIS Express for Web Sites and Projects" option under the Projects and Solutions => Web Projects section under the Tools=>Options menu.







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Jun 22 '15 at 19:03









                        Joey MorganJoey Morgan

                        48049




                        48049













                        • Thanks this solved an issue with pdfium for me!

                          – Akinzekeel
                          Apr 18 '16 at 11:41






                        • 2





                          What a life saver!! Thank you. For me I had to actually check this, since my project is effectively x64. Thanks again!!!

                          – viper
                          Oct 17 '16 at 14:14











                        • After all the help I have received here, I am very glad to have been able to pay some of it forward!

                          – Joseph Morgan
                          Oct 20 '16 at 23:06






                        • 2





                          For those using Local IIS, make sure your app pool's "Enable 32-Bit Applications" (under Advanced Settings) is set to True.

                          – Eric Eskildsen
                          Mar 15 '17 at 18:46











                        • An addenum to @EricEskildsen's comment above about "enable 32-bit applications" in the application pool, even if you don't want to do that in the live environment, flipping that switch can provide additional clues as to whether you are facing a 32-bit/64-bit problem or something else.

                          – a CVn
                          Mar 16 '17 at 8:11



















                        • Thanks this solved an issue with pdfium for me!

                          – Akinzekeel
                          Apr 18 '16 at 11:41






                        • 2





                          What a life saver!! Thank you. For me I had to actually check this, since my project is effectively x64. Thanks again!!!

                          – viper
                          Oct 17 '16 at 14:14











                        • After all the help I have received here, I am very glad to have been able to pay some of it forward!

                          – Joseph Morgan
                          Oct 20 '16 at 23:06






                        • 2





                          For those using Local IIS, make sure your app pool's "Enable 32-Bit Applications" (under Advanced Settings) is set to True.

                          – Eric Eskildsen
                          Mar 15 '17 at 18:46











                        • An addenum to @EricEskildsen's comment above about "enable 32-bit applications" in the application pool, even if you don't want to do that in the live environment, flipping that switch can provide additional clues as to whether you are facing a 32-bit/64-bit problem or something else.

                          – a CVn
                          Mar 16 '17 at 8:11

















                        Thanks this solved an issue with pdfium for me!

                        – Akinzekeel
                        Apr 18 '16 at 11:41





                        Thanks this solved an issue with pdfium for me!

                        – Akinzekeel
                        Apr 18 '16 at 11:41




                        2




                        2





                        What a life saver!! Thank you. For me I had to actually check this, since my project is effectively x64. Thanks again!!!

                        – viper
                        Oct 17 '16 at 14:14





                        What a life saver!! Thank you. For me I had to actually check this, since my project is effectively x64. Thanks again!!!

                        – viper
                        Oct 17 '16 at 14:14













                        After all the help I have received here, I am very glad to have been able to pay some of it forward!

                        – Joseph Morgan
                        Oct 20 '16 at 23:06





                        After all the help I have received here, I am very glad to have been able to pay some of it forward!

                        – Joseph Morgan
                        Oct 20 '16 at 23:06




                        2




                        2





                        For those using Local IIS, make sure your app pool's "Enable 32-Bit Applications" (under Advanced Settings) is set to True.

                        – Eric Eskildsen
                        Mar 15 '17 at 18:46





                        For those using Local IIS, make sure your app pool's "Enable 32-Bit Applications" (under Advanced Settings) is set to True.

                        – Eric Eskildsen
                        Mar 15 '17 at 18:46













                        An addenum to @EricEskildsen's comment above about "enable 32-bit applications" in the application pool, even if you don't want to do that in the live environment, flipping that switch can provide additional clues as to whether you are facing a 32-bit/64-bit problem or something else.

                        – a CVn
                        Mar 16 '17 at 8:11





                        An addenum to @EricEskildsen's comment above about "enable 32-bit applications" in the application pool, even if you don't want to do that in the live environment, flipping that switch can provide additional clues as to whether you are facing a 32-bit/64-bit problem or something else.

                        – a CVn
                        Mar 16 '17 at 8:11











                        13














                        What I found worked was checking the "Use the 64 bit version of IIS Express for Web Sites and Projects" option under the Projects and Solutions => Web Projects section under the Tools=>Options menu.






                        share|improve this answer
























                        • THANK YOU!!! I've been struggling with this for an hour now. :)

                          – vsdev
                          Jun 20 '18 at 8:53











                        • you are the savior. +1

                          – Amit Kumar
                          Sep 3 '18 at 9:32


















                        13














                        What I found worked was checking the "Use the 64 bit version of IIS Express for Web Sites and Projects" option under the Projects and Solutions => Web Projects section under the Tools=>Options menu.






                        share|improve this answer
























                        • THANK YOU!!! I've been struggling with this for an hour now. :)

                          – vsdev
                          Jun 20 '18 at 8:53











                        • you are the savior. +1

                          – Amit Kumar
                          Sep 3 '18 at 9:32
















                        13












                        13








                        13







                        What I found worked was checking the "Use the 64 bit version of IIS Express for Web Sites and Projects" option under the Projects and Solutions => Web Projects section under the Tools=>Options menu.






                        share|improve this answer













                        What I found worked was checking the "Use the 64 bit version of IIS Express for Web Sites and Projects" option under the Projects and Solutions => Web Projects section under the Tools=>Options menu.







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Oct 14 '16 at 14:42









                        Lucy ZhangLucy Zhang

                        13112




                        13112













                        • THANK YOU!!! I've been struggling with this for an hour now. :)

                          – vsdev
                          Jun 20 '18 at 8:53











                        • you are the savior. +1

                          – Amit Kumar
                          Sep 3 '18 at 9:32





















                        • THANK YOU!!! I've been struggling with this for an hour now. :)

                          – vsdev
                          Jun 20 '18 at 8:53











                        • you are the savior. +1

                          – Amit Kumar
                          Sep 3 '18 at 9:32



















                        THANK YOU!!! I've been struggling with this for an hour now. :)

                        – vsdev
                        Jun 20 '18 at 8:53





                        THANK YOU!!! I've been struggling with this for an hour now. :)

                        – vsdev
                        Jun 20 '18 at 8:53













                        you are the savior. +1

                        – Amit Kumar
                        Sep 3 '18 at 9:32







                        you are the savior. +1

                        – Amit Kumar
                        Sep 3 '18 at 9:32













                        11














                        It can typically occur when you changed the target framework of .csproj and reverted it back to what you started with.



                        Make sure 1 if supportedRuntime version="a different runtime from cs project target" under startup tag in app.config.



                        Make sure 2 That also means checking other autogenerated or other files in may be properties folder to see if there is no more runtime mismatch between these files and one that is defined in .csproj file.



                        These might just save you lot of time before you start trying different things with project properties to overcome the error.






                        share|improve this answer
























                        • I came across a similar problem and your answer was the solution for mine. My app.config had different supported runtime.

                          – Krisztián Kis
                          Sep 22 '15 at 8:36
















                        11














                        It can typically occur when you changed the target framework of .csproj and reverted it back to what you started with.



                        Make sure 1 if supportedRuntime version="a different runtime from cs project target" under startup tag in app.config.



                        Make sure 2 That also means checking other autogenerated or other files in may be properties folder to see if there is no more runtime mismatch between these files and one that is defined in .csproj file.



                        These might just save you lot of time before you start trying different things with project properties to overcome the error.






                        share|improve this answer
























                        • I came across a similar problem and your answer was the solution for mine. My app.config had different supported runtime.

                          – Krisztián Kis
                          Sep 22 '15 at 8:36














                        11












                        11








                        11







                        It can typically occur when you changed the target framework of .csproj and reverted it back to what you started with.



                        Make sure 1 if supportedRuntime version="a different runtime from cs project target" under startup tag in app.config.



                        Make sure 2 That also means checking other autogenerated or other files in may be properties folder to see if there is no more runtime mismatch between these files and one that is defined in .csproj file.



                        These might just save you lot of time before you start trying different things with project properties to overcome the error.






                        share|improve this answer













                        It can typically occur when you changed the target framework of .csproj and reverted it back to what you started with.



                        Make sure 1 if supportedRuntime version="a different runtime from cs project target" under startup tag in app.config.



                        Make sure 2 That also means checking other autogenerated or other files in may be properties folder to see if there is no more runtime mismatch between these files and one that is defined in .csproj file.



                        These might just save you lot of time before you start trying different things with project properties to overcome the error.







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Apr 11 '13 at 10:36









                        purvinpurvin

                        13413




                        13413













                        • I came across a similar problem and your answer was the solution for mine. My app.config had different supported runtime.

                          – Krisztián Kis
                          Sep 22 '15 at 8:36



















                        • I came across a similar problem and your answer was the solution for mine. My app.config had different supported runtime.

                          – Krisztián Kis
                          Sep 22 '15 at 8:36

















                        I came across a similar problem and your answer was the solution for mine. My app.config had different supported runtime.

                        – Krisztián Kis
                        Sep 22 '15 at 8:36





                        I came across a similar problem and your answer was the solution for mine. My app.config had different supported runtime.

                        – Krisztián Kis
                        Sep 22 '15 at 8:36











                        7














                        I had the same problem even though I have 64-bit Windows 7 and i was loading a 64bit DLL b/c in Project properties | Build I had "Prefer 32-bit" checked. (Don't know why that's set by default). Once I unchecked that, everything ran fine






                        share|improve this answer
























                        • Same here. This did the trick. Referenced a 64-bit assembly and the active build configuration was set to Any CPU but because of this "prefer 32-bit" setting assumably 32-bit was used running the application and caused the troubles.

                          – Bernoulli IT
                          Jun 30 '16 at 11:49
















                        7














                        I had the same problem even though I have 64-bit Windows 7 and i was loading a 64bit DLL b/c in Project properties | Build I had "Prefer 32-bit" checked. (Don't know why that's set by default). Once I unchecked that, everything ran fine






                        share|improve this answer
























                        • Same here. This did the trick. Referenced a 64-bit assembly and the active build configuration was set to Any CPU but because of this "prefer 32-bit" setting assumably 32-bit was used running the application and caused the troubles.

                          – Bernoulli IT
                          Jun 30 '16 at 11:49














                        7












                        7








                        7







                        I had the same problem even though I have 64-bit Windows 7 and i was loading a 64bit DLL b/c in Project properties | Build I had "Prefer 32-bit" checked. (Don't know why that's set by default). Once I unchecked that, everything ran fine






                        share|improve this answer













                        I had the same problem even though I have 64-bit Windows 7 and i was loading a 64bit DLL b/c in Project properties | Build I had "Prefer 32-bit" checked. (Don't know why that's set by default). Once I unchecked that, everything ran fine







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Jul 17 '13 at 21:25









                        S.N.S.N.

                        43239




                        43239













                        • Same here. This did the trick. Referenced a 64-bit assembly and the active build configuration was set to Any CPU but because of this "prefer 32-bit" setting assumably 32-bit was used running the application and caused the troubles.

                          – Bernoulli IT
                          Jun 30 '16 at 11:49



















                        • Same here. This did the trick. Referenced a 64-bit assembly and the active build configuration was set to Any CPU but because of this "prefer 32-bit" setting assumably 32-bit was used running the application and caused the troubles.

                          – Bernoulli IT
                          Jun 30 '16 at 11:49

















                        Same here. This did the trick. Referenced a 64-bit assembly and the active build configuration was set to Any CPU but because of this "prefer 32-bit" setting assumably 32-bit was used running the application and caused the troubles.

                        – Bernoulli IT
                        Jun 30 '16 at 11:49





                        Same here. This did the trick. Referenced a 64-bit assembly and the active build configuration was set to Any CPU but because of this "prefer 32-bit" setting assumably 32-bit was used running the application and caused the troubles.

                        – Bernoulli IT
                        Jun 30 '16 at 11:49











                        7














                        You can also get this exception when your application target .NET Framework 4.5 (for example) and you have the following app.config :



                        <?xml version="1.0" encoding="utf-8"?>
                        <configuration>
                        <startup>
                        <supportedRuntime version="v2.0.50727" />
                        <supportedRuntime version="v4.0" />
                        </startup>
                        </configuration>


                        When trying to launch the debug of the application you will get the BadImageFormatException.



                        Removing the line declaring the v2.0 version will clear the error.



                        I had this issue recently when I tried to change the target platform from an old .NET 2.0 project to .NET 4.5.






                        share|improve this answer




























                          7














                          You can also get this exception when your application target .NET Framework 4.5 (for example) and you have the following app.config :



                          <?xml version="1.0" encoding="utf-8"?>
                          <configuration>
                          <startup>
                          <supportedRuntime version="v2.0.50727" />
                          <supportedRuntime version="v4.0" />
                          </startup>
                          </configuration>


                          When trying to launch the debug of the application you will get the BadImageFormatException.



                          Removing the line declaring the v2.0 version will clear the error.



                          I had this issue recently when I tried to change the target platform from an old .NET 2.0 project to .NET 4.5.






                          share|improve this answer


























                            7












                            7








                            7







                            You can also get this exception when your application target .NET Framework 4.5 (for example) and you have the following app.config :



                            <?xml version="1.0" encoding="utf-8"?>
                            <configuration>
                            <startup>
                            <supportedRuntime version="v2.0.50727" />
                            <supportedRuntime version="v4.0" />
                            </startup>
                            </configuration>


                            When trying to launch the debug of the application you will get the BadImageFormatException.



                            Removing the line declaring the v2.0 version will clear the error.



                            I had this issue recently when I tried to change the target platform from an old .NET 2.0 project to .NET 4.5.






                            share|improve this answer













                            You can also get this exception when your application target .NET Framework 4.5 (for example) and you have the following app.config :



                            <?xml version="1.0" encoding="utf-8"?>
                            <configuration>
                            <startup>
                            <supportedRuntime version="v2.0.50727" />
                            <supportedRuntime version="v4.0" />
                            </startup>
                            </configuration>


                            When trying to launch the debug of the application you will get the BadImageFormatException.



                            Removing the line declaring the v2.0 version will clear the error.



                            I had this issue recently when I tried to change the target platform from an old .NET 2.0 project to .NET 4.5.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Apr 1 '15 at 22:39









                            Cédric VCédric V

                            74211424




                            74211424























                                5














                                Background



                                We started getting this today when we switched our WCF service from AnyCPU to x64 on a Windows 2012 R2 server running IIS 6.2.



                                First we checked the only referenced assembly 10 times, to ensure it was not actually an x86 dll. Next we checked the application pool many times to ensure it was not enabling 32 bit applications.



                                On a whim I tried toggling the setting. It turns out the application pools in IIS were defaulting to an Enable 32-Bit Applications value of False, but IIS was ignoring it on our server for some reason and always ran our service in x86 mode.



                                Solution




                                • Select the app pool.

                                • Choose Set Application Pool Defaults... or Advanced Settings....

                                • Change Enable 32-Bit Applications to True.

                                • Click OK.

                                • Choose Set Application Pool Defaults... or Advanced Settings... again.

                                • Change Enable 32-Bit Applications back to False.

                                • Click OK.






                                share|improve this answer




























                                  5














                                  Background



                                  We started getting this today when we switched our WCF service from AnyCPU to x64 on a Windows 2012 R2 server running IIS 6.2.



                                  First we checked the only referenced assembly 10 times, to ensure it was not actually an x86 dll. Next we checked the application pool many times to ensure it was not enabling 32 bit applications.



                                  On a whim I tried toggling the setting. It turns out the application pools in IIS were defaulting to an Enable 32-Bit Applications value of False, but IIS was ignoring it on our server for some reason and always ran our service in x86 mode.



                                  Solution




                                  • Select the app pool.

                                  • Choose Set Application Pool Defaults... or Advanced Settings....

                                  • Change Enable 32-Bit Applications to True.

                                  • Click OK.

                                  • Choose Set Application Pool Defaults... or Advanced Settings... again.

                                  • Change Enable 32-Bit Applications back to False.

                                  • Click OK.






                                  share|improve this answer


























                                    5












                                    5








                                    5







                                    Background



                                    We started getting this today when we switched our WCF service from AnyCPU to x64 on a Windows 2012 R2 server running IIS 6.2.



                                    First we checked the only referenced assembly 10 times, to ensure it was not actually an x86 dll. Next we checked the application pool many times to ensure it was not enabling 32 bit applications.



                                    On a whim I tried toggling the setting. It turns out the application pools in IIS were defaulting to an Enable 32-Bit Applications value of False, but IIS was ignoring it on our server for some reason and always ran our service in x86 mode.



                                    Solution




                                    • Select the app pool.

                                    • Choose Set Application Pool Defaults... or Advanced Settings....

                                    • Change Enable 32-Bit Applications to True.

                                    • Click OK.

                                    • Choose Set Application Pool Defaults... or Advanced Settings... again.

                                    • Change Enable 32-Bit Applications back to False.

                                    • Click OK.






                                    share|improve this answer













                                    Background



                                    We started getting this today when we switched our WCF service from AnyCPU to x64 on a Windows 2012 R2 server running IIS 6.2.



                                    First we checked the only referenced assembly 10 times, to ensure it was not actually an x86 dll. Next we checked the application pool many times to ensure it was not enabling 32 bit applications.



                                    On a whim I tried toggling the setting. It turns out the application pools in IIS were defaulting to an Enable 32-Bit Applications value of False, but IIS was ignoring it on our server for some reason and always ran our service in x86 mode.



                                    Solution




                                    • Select the app pool.

                                    • Choose Set Application Pool Defaults... or Advanced Settings....

                                    • Change Enable 32-Bit Applications to True.

                                    • Click OK.

                                    • Choose Set Application Pool Defaults... or Advanced Settings... again.

                                    • Change Enable 32-Bit Applications back to False.

                                    • Click OK.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Mar 9 '16 at 20:45









                                    JoelCJoelC

                                    2,37382832




                                    2,37382832























                                        4














                                        For anyone who may arrive here at a later time....Nothing worked for me. All my assemblies were fine. I had an app config in one of my Visual Studio Projects that shouldn't have been there. So make sure your app config file is needed.



                                        I deleted the extra app config and it worked.






                                        share|improve this answer
























                                        • Fixed it for me. My App.config was setting my .NET 4.5.1 app to the 2.0 CLR!

                                          – Jared Thirsk
                                          May 19 '15 at 19:47
















                                        4














                                        For anyone who may arrive here at a later time....Nothing worked for me. All my assemblies were fine. I had an app config in one of my Visual Studio Projects that shouldn't have been there. So make sure your app config file is needed.



                                        I deleted the extra app config and it worked.






                                        share|improve this answer
























                                        • Fixed it for me. My App.config was setting my .NET 4.5.1 app to the 2.0 CLR!

                                          – Jared Thirsk
                                          May 19 '15 at 19:47














                                        4












                                        4








                                        4







                                        For anyone who may arrive here at a later time....Nothing worked for me. All my assemblies were fine. I had an app config in one of my Visual Studio Projects that shouldn't have been there. So make sure your app config file is needed.



                                        I deleted the extra app config and it worked.






                                        share|improve this answer













                                        For anyone who may arrive here at a later time....Nothing worked for me. All my assemblies were fine. I had an app config in one of my Visual Studio Projects that shouldn't have been there. So make sure your app config file is needed.



                                        I deleted the extra app config and it worked.







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered May 8 '15 at 19:58









                                        McSickMcSick

                                        101115




                                        101115













                                        • Fixed it for me. My App.config was setting my .NET 4.5.1 app to the 2.0 CLR!

                                          – Jared Thirsk
                                          May 19 '15 at 19:47



















                                        • Fixed it for me. My App.config was setting my .NET 4.5.1 app to the 2.0 CLR!

                                          – Jared Thirsk
                                          May 19 '15 at 19:47

















                                        Fixed it for me. My App.config was setting my .NET 4.5.1 app to the 2.0 CLR!

                                        – Jared Thirsk
                                        May 19 '15 at 19:47





                                        Fixed it for me. My App.config was setting my .NET 4.5.1 app to the 2.0 CLR!

                                        – Jared Thirsk
                                        May 19 '15 at 19:47











                                        3














                                        I fixed this issue by changing the web app to use a different "Application Pool".






                                        share|improve this answer




























                                          3














                                          I fixed this issue by changing the web app to use a different "Application Pool".






                                          share|improve this answer


























                                            3












                                            3








                                            3







                                            I fixed this issue by changing the web app to use a different "Application Pool".






                                            share|improve this answer













                                            I fixed this issue by changing the web app to use a different "Application Pool".







                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Dec 31 '14 at 14:19









                                            Cocu_1012Cocu_1012

                                            813




                                            813























                                                2














                                                Determine the application pool used by the application and set the property of by setting Enable 32 bit applications to True. This can be done through advance settings of the application pool.






                                                share|improve this answer




























                                                  2














                                                  Determine the application pool used by the application and set the property of by setting Enable 32 bit applications to True. This can be done through advance settings of the application pool.






                                                  share|improve this answer


























                                                    2












                                                    2








                                                    2







                                                    Determine the application pool used by the application and set the property of by setting Enable 32 bit applications to True. This can be done through advance settings of the application pool.






                                                    share|improve this answer













                                                    Determine the application pool used by the application and set the property of by setting Enable 32 bit applications to True. This can be done through advance settings of the application pool.







                                                    share|improve this answer












                                                    share|improve this answer



                                                    share|improve this answer










                                                    answered May 12 '15 at 13:55









                                                    AnandAnand

                                                    211




                                                    211























                                                        1














                                                        When building apps for 32-bit or 64-bit platform (My experience is with Visual Studio 2010), don't rely on the Configuration Manager to set the correct platform for the executable. Even if the CM has x86 selected for the application, check the project properties (Build tab): it might still say "Any CPU" there. And if you run an "Any CPU" executable on a 64-bit platform, it will run in 64-bit mode and refuse to load your accompanying DLLs that were built for the x86 platform.






                                                        share|improve this answer




























                                                          1














                                                          When building apps for 32-bit or 64-bit platform (My experience is with Visual Studio 2010), don't rely on the Configuration Manager to set the correct platform for the executable. Even if the CM has x86 selected for the application, check the project properties (Build tab): it might still say "Any CPU" there. And if you run an "Any CPU" executable on a 64-bit platform, it will run in 64-bit mode and refuse to load your accompanying DLLs that were built for the x86 platform.






                                                          share|improve this answer


























                                                            1












                                                            1








                                                            1







                                                            When building apps for 32-bit or 64-bit platform (My experience is with Visual Studio 2010), don't rely on the Configuration Manager to set the correct platform for the executable. Even if the CM has x86 selected for the application, check the project properties (Build tab): it might still say "Any CPU" there. And if you run an "Any CPU" executable on a 64-bit platform, it will run in 64-bit mode and refuse to load your accompanying DLLs that were built for the x86 platform.






                                                            share|improve this answer













                                                            When building apps for 32-bit or 64-bit platform (My experience is with Visual Studio 2010), don't rely on the Configuration Manager to set the correct platform for the executable. Even if the CM has x86 selected for the application, check the project properties (Build tab): it might still say "Any CPU" there. And if you run an "Any CPU" executable on a 64-bit platform, it will run in 64-bit mode and refuse to load your accompanying DLLs that were built for the x86 platform.







                                                            share|improve this answer












                                                            share|improve this answer



                                                            share|improve this answer










                                                            answered Jun 24 '15 at 14:20









                                                            Jeremy TinklerJeremy Tinkler

                                                            305




                                                            305























                                                                0














                                                                For anyone who may arrive here at a later time...

                                                                For Desktop solution I got BadImageFormatException exception.

                                                                All project's build options was fine (all x86). But StartUp project of solution was changed to some other project(class library project).



                                                                Changing StartUp project to the original(.exe application project) was a solution in my case






                                                                share|improve this answer




























                                                                  0














                                                                  For anyone who may arrive here at a later time...

                                                                  For Desktop solution I got BadImageFormatException exception.

                                                                  All project's build options was fine (all x86). But StartUp project of solution was changed to some other project(class library project).



                                                                  Changing StartUp project to the original(.exe application project) was a solution in my case






                                                                  share|improve this answer


























                                                                    0












                                                                    0








                                                                    0







                                                                    For anyone who may arrive here at a later time...

                                                                    For Desktop solution I got BadImageFormatException exception.

                                                                    All project's build options was fine (all x86). But StartUp project of solution was changed to some other project(class library project).



                                                                    Changing StartUp project to the original(.exe application project) was a solution in my case






                                                                    share|improve this answer













                                                                    For anyone who may arrive here at a later time...

                                                                    For Desktop solution I got BadImageFormatException exception.

                                                                    All project's build options was fine (all x86). But StartUp project of solution was changed to some other project(class library project).



                                                                    Changing StartUp project to the original(.exe application project) was a solution in my case







                                                                    share|improve this answer












                                                                    share|improve this answer



                                                                    share|improve this answer










                                                                    answered Nov 26 '15 at 9:44









                                                                    FabioFabio

                                                                    19.3k22044




                                                                    19.3k22044























                                                                        0














                                                                        When I faced this issue the following solved it for me:



                                                                        I was calling a OpenCV dll from inside another exe, my dll did not contained the already needed opencv dlls like highgui, features2d, and etc available in the folder of my exe file. I copied all these to the directory of my exe project and it suddenly worked.






                                                                        share|improve this answer






























                                                                          0














                                                                          When I faced this issue the following solved it for me:



                                                                          I was calling a OpenCV dll from inside another exe, my dll did not contained the already needed opencv dlls like highgui, features2d, and etc available in the folder of my exe file. I copied all these to the directory of my exe project and it suddenly worked.






                                                                          share|improve this answer




























                                                                            0












                                                                            0








                                                                            0







                                                                            When I faced this issue the following solved it for me:



                                                                            I was calling a OpenCV dll from inside another exe, my dll did not contained the already needed opencv dlls like highgui, features2d, and etc available in the folder of my exe file. I copied all these to the directory of my exe project and it suddenly worked.






                                                                            share|improve this answer















                                                                            When I faced this issue the following solved it for me:



                                                                            I was calling a OpenCV dll from inside another exe, my dll did not contained the already needed opencv dlls like highgui, features2d, and etc available in the folder of my exe file. I copied all these to the directory of my exe project and it suddenly worked.







                                                                            share|improve this answer














                                                                            share|improve this answer



                                                                            share|improve this answer








                                                                            edited Oct 24 '16 at 15:28









                                                                            ryanyuyu

                                                                            5,38893543




                                                                            5,38893543










                                                                            answered Oct 24 '16 at 12:41









                                                                            Ali NejadAli Nejad

                                                                            116




                                                                            116























                                                                                0














                                                                                Remove your dependency on System.Runtime in your Web.Config, it worked for me:



                                                                                <dependentAssembly>
                                                                                <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                                                                                <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
                                                                                </dependentAssembly>





                                                                                share|improve this answer






























                                                                                  0














                                                                                  Remove your dependency on System.Runtime in your Web.Config, it worked for me:



                                                                                  <dependentAssembly>
                                                                                  <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                                                                                  <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
                                                                                  </dependentAssembly>





                                                                                  share|improve this answer




























                                                                                    0












                                                                                    0








                                                                                    0







                                                                                    Remove your dependency on System.Runtime in your Web.Config, it worked for me:



                                                                                    <dependentAssembly>
                                                                                    <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                                                                                    <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
                                                                                    </dependentAssembly>





                                                                                    share|improve this answer















                                                                                    Remove your dependency on System.Runtime in your Web.Config, it worked for me:



                                                                                    <dependentAssembly>
                                                                                    <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                                                                                    <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
                                                                                    </dependentAssembly>






                                                                                    share|improve this answer














                                                                                    share|improve this answer



                                                                                    share|improve this answer








                                                                                    edited Nov 3 '16 at 18:32









                                                                                    Ajean

                                                                                    3,956103149




                                                                                    3,956103149










                                                                                    answered Nov 3 '16 at 18:12









                                                                                    NiclasNiclas

                                                                                    11




                                                                                    11























                                                                                        0














                                                                                        This error "Could not load file or assembly 'example' or one of its dependencies. An attempt was made to load a program with an incorrect format" is typically caused by an incorrect application pool configuration.




                                                                                        1. Ensure that the AppPool your site is currently running on has "Enable 32-Bit Applications" set to False.

                                                                                        2. Ensure you are using the correct version for your platform.

                                                                                        3. If you are getting this error on a web site, ensure that your application pool is set to run in the correct mode (3.0 sites should run in 64 bit mode)

                                                                                        4. You should also make sure that the reference to that assembly in visual studio is pointing at the correct file in the packages folder.

                                                                                        5. Ensure you have the correct version of the dll installed in the GAC for 2.0 sites.

                                                                                        6. This can also be caused by WSODLibs being promoted with the web project.






                                                                                        share|improve this answer




























                                                                                          0














                                                                                          This error "Could not load file or assembly 'example' or one of its dependencies. An attempt was made to load a program with an incorrect format" is typically caused by an incorrect application pool configuration.




                                                                                          1. Ensure that the AppPool your site is currently running on has "Enable 32-Bit Applications" set to False.

                                                                                          2. Ensure you are using the correct version for your platform.

                                                                                          3. If you are getting this error on a web site, ensure that your application pool is set to run in the correct mode (3.0 sites should run in 64 bit mode)

                                                                                          4. You should also make sure that the reference to that assembly in visual studio is pointing at the correct file in the packages folder.

                                                                                          5. Ensure you have the correct version of the dll installed in the GAC for 2.0 sites.

                                                                                          6. This can also be caused by WSODLibs being promoted with the web project.






                                                                                          share|improve this answer


























                                                                                            0












                                                                                            0








                                                                                            0







                                                                                            This error "Could not load file or assembly 'example' or one of its dependencies. An attempt was made to load a program with an incorrect format" is typically caused by an incorrect application pool configuration.




                                                                                            1. Ensure that the AppPool your site is currently running on has "Enable 32-Bit Applications" set to False.

                                                                                            2. Ensure you are using the correct version for your platform.

                                                                                            3. If you are getting this error on a web site, ensure that your application pool is set to run in the correct mode (3.0 sites should run in 64 bit mode)

                                                                                            4. You should also make sure that the reference to that assembly in visual studio is pointing at the correct file in the packages folder.

                                                                                            5. Ensure you have the correct version of the dll installed in the GAC for 2.0 sites.

                                                                                            6. This can also be caused by WSODLibs being promoted with the web project.






                                                                                            share|improve this answer













                                                                                            This error "Could not load file or assembly 'example' or one of its dependencies. An attempt was made to load a program with an incorrect format" is typically caused by an incorrect application pool configuration.




                                                                                            1. Ensure that the AppPool your site is currently running on has "Enable 32-Bit Applications" set to False.

                                                                                            2. Ensure you are using the correct version for your platform.

                                                                                            3. If you are getting this error on a web site, ensure that your application pool is set to run in the correct mode (3.0 sites should run in 64 bit mode)

                                                                                            4. You should also make sure that the reference to that assembly in visual studio is pointing at the correct file in the packages folder.

                                                                                            5. Ensure you have the correct version of the dll installed in the GAC for 2.0 sites.

                                                                                            6. This can also be caused by WSODLibs being promoted with the web project.







                                                                                            share|improve this answer












                                                                                            share|improve this answer



                                                                                            share|improve this answer










                                                                                            answered Sep 25 '17 at 20:30









                                                                                            Ben PetersenBen Petersen

                                                                                            355214




                                                                                            355214























                                                                                                0
















                                                                                                For .NET Core, there is a Visual Studio 2017 bug that can cause the project properties Build page to show the incorrect platform target. Once you discover that the problem is, the workarounds are pretty easy. You can change the target to some other value and then change it back.



                                                                                                Alternatively, you can add a runtime identifier to the .csproj. If you need your .exe to run as x86 so that it can load a x86 native DLL, add this element within a PropertyGroup:



                                                                                                <RuntimeIdentifier>win-x86</RuntimeIdentifier>


                                                                                                A good place to put this is right after the TargetFramework or TargetFrameworks element.






                                                                                                share|improve this answer




























                                                                                                  0
















                                                                                                  For .NET Core, there is a Visual Studio 2017 bug that can cause the project properties Build page to show the incorrect platform target. Once you discover that the problem is, the workarounds are pretty easy. You can change the target to some other value and then change it back.



                                                                                                  Alternatively, you can add a runtime identifier to the .csproj. If you need your .exe to run as x86 so that it can load a x86 native DLL, add this element within a PropertyGroup:



                                                                                                  <RuntimeIdentifier>win-x86</RuntimeIdentifier>


                                                                                                  A good place to put this is right after the TargetFramework or TargetFrameworks element.






                                                                                                  share|improve this answer


























                                                                                                    0












                                                                                                    0








                                                                                                    0









                                                                                                    For .NET Core, there is a Visual Studio 2017 bug that can cause the project properties Build page to show the incorrect platform target. Once you discover that the problem is, the workarounds are pretty easy. You can change the target to some other value and then change it back.



                                                                                                    Alternatively, you can add a runtime identifier to the .csproj. If you need your .exe to run as x86 so that it can load a x86 native DLL, add this element within a PropertyGroup:



                                                                                                    <RuntimeIdentifier>win-x86</RuntimeIdentifier>


                                                                                                    A good place to put this is right after the TargetFramework or TargetFrameworks element.






                                                                                                    share|improve this answer















                                                                                                    For .NET Core, there is a Visual Studio 2017 bug that can cause the project properties Build page to show the incorrect platform target. Once you discover that the problem is, the workarounds are pretty easy. You can change the target to some other value and then change it back.



                                                                                                    Alternatively, you can add a runtime identifier to the .csproj. If you need your .exe to run as x86 so that it can load a x86 native DLL, add this element within a PropertyGroup:



                                                                                                    <RuntimeIdentifier>win-x86</RuntimeIdentifier>


                                                                                                    A good place to put this is right after the TargetFramework or TargetFrameworks element.







                                                                                                    share|improve this answer












                                                                                                    share|improve this answer



                                                                                                    share|improve this answer










                                                                                                    answered Jan 1 '18 at 15:50









                                                                                                    Edward BreyEdward Brey

                                                                                                    26.2k10131180




                                                                                                    26.2k10131180























                                                                                                        0














                                                                                                        I am surprised that no-one else has mentioned this so I am sharing in case none of the above help (my case).



                                                                                                        What was happening was that an VBCSCompiler.exe instance was somehow stuck and was in fact not releasing the file handles to allow new instances to correctly write the new files and was causing the issue. This became apparent when I tried to delete the "bin" folder and it was complaining that another process was using files in there.



                                                                                                        Closed VS, opened task manager, looked and terminated all VBCSCompiler instances and deleted the "bin" folder to get back to where I was.



                                                                                                        Reference: https://developercommunity.visualstudio.com/content/problem/117596/vbcscompilerexe-process-stays-runing-after-exiting.html






                                                                                                        share|improve this answer






























                                                                                                          0














                                                                                                          I am surprised that no-one else has mentioned this so I am sharing in case none of the above help (my case).



                                                                                                          What was happening was that an VBCSCompiler.exe instance was somehow stuck and was in fact not releasing the file handles to allow new instances to correctly write the new files and was causing the issue. This became apparent when I tried to delete the "bin" folder and it was complaining that another process was using files in there.



                                                                                                          Closed VS, opened task manager, looked and terminated all VBCSCompiler instances and deleted the "bin" folder to get back to where I was.



                                                                                                          Reference: https://developercommunity.visualstudio.com/content/problem/117596/vbcscompilerexe-process-stays-runing-after-exiting.html






                                                                                                          share|improve this answer




























                                                                                                            0












                                                                                                            0








                                                                                                            0







                                                                                                            I am surprised that no-one else has mentioned this so I am sharing in case none of the above help (my case).



                                                                                                            What was happening was that an VBCSCompiler.exe instance was somehow stuck and was in fact not releasing the file handles to allow new instances to correctly write the new files and was causing the issue. This became apparent when I tried to delete the "bin" folder and it was complaining that another process was using files in there.



                                                                                                            Closed VS, opened task manager, looked and terminated all VBCSCompiler instances and deleted the "bin" folder to get back to where I was.



                                                                                                            Reference: https://developercommunity.visualstudio.com/content/problem/117596/vbcscompilerexe-process-stays-runing-after-exiting.html






                                                                                                            share|improve this answer















                                                                                                            I am surprised that no-one else has mentioned this so I am sharing in case none of the above help (my case).



                                                                                                            What was happening was that an VBCSCompiler.exe instance was somehow stuck and was in fact not releasing the file handles to allow new instances to correctly write the new files and was causing the issue. This became apparent when I tried to delete the "bin" folder and it was complaining that another process was using files in there.



                                                                                                            Closed VS, opened task manager, looked and terminated all VBCSCompiler instances and deleted the "bin" folder to get back to where I was.



                                                                                                            Reference: https://developercommunity.visualstudio.com/content/problem/117596/vbcscompilerexe-process-stays-runing-after-exiting.html







                                                                                                            share|improve this answer














                                                                                                            share|improve this answer



                                                                                                            share|improve this answer








                                                                                                            edited Dec 6 '18 at 17:43

























                                                                                                            answered Dec 6 '18 at 17:38









                                                                                                            GeorgeGeorge

                                                                                                            704617




                                                                                                            704617






























                                                                                                                draft saved

                                                                                                                draft discarded




















































                                                                                                                Thanks for contributing an answer to Stack Overflow!


                                                                                                                • Please be sure to answer the question. Provide details and share your research!

                                                                                                                But avoid



                                                                                                                • Asking for help, clarification, or responding to other answers.

                                                                                                                • Making statements based on opinion; back them up with references or personal experience.


                                                                                                                To learn more, see our tips on writing great answers.




                                                                                                                draft saved


                                                                                                                draft discarded














                                                                                                                StackExchange.ready(
                                                                                                                function () {
                                                                                                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f8996653%2ftroubleshooting-badimageformatexception%23new-answer', 'question_page');
                                                                                                                }
                                                                                                                );

                                                                                                                Post as a guest















                                                                                                                Required, but never shown





















































                                                                                                                Required, but never shown














                                                                                                                Required, but never shown












                                                                                                                Required, but never shown







                                                                                                                Required, but never shown

































                                                                                                                Required, but never shown














                                                                                                                Required, but never shown












                                                                                                                Required, but never shown







                                                                                                                Required, but never shown







                                                                                                                Popular posts from this blog

                                                                                                                Sphinx de Gizeh

                                                                                                                Dijon

                                                                                                                Langue