title: Could not load file or assembly xxx or one of its dependencies. An attempt was made to load a program with an incorrect format
body: <p>I have checked all similar questions but no solution worked for me:
  I have my web application build properties set to: Any CPU for all configurations. (I have also tried all combinations) - that is what mostly solved the problem in similar questions.</p>
  
  <p>Also in app pool I have 32 bit application set to TRUE.
  I run my web site on IIS 7.5</p>
  
  <p>My web application is build without and error, but when i run it i get the following error from log:</p>
  
  <pre><code>*** Assembly Binder Log Entry  (23.3.2016 @ 9:51:19) ***
  
  The operation failed.
  Bind result: hr = 0x8007000b. An attempt was made to load a program with an     incorrect format.
  
  Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
  Running under executable  C:\WINDOWS\SysWOW64\inetsrv\w3wp.exe
  --- A detailed error log follows. 
  
  === Pre-bind state information ===
  LOG: DisplayName = SM.EORD.Web
  (Partial)
  WRN: Partial binding information was supplied for an assembly:
  WRN: Assembly Name: SM.EORD.Web | Domain ID: 3
  WRN: A partial bind occurs when only part of the assembly display name is   provided.
  WRN: This might result in the binder loading an incorrect assembly.
  WRN: It is recommended to provide a fully specified textual identity for the   assembly,
  WRN: that consists of the simple name, version, culture, and public key  token.
  WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
  LOG: Appbase =   file:///D:/Documents/Projekti/TFSProd/eOrdering/Main/Source/SM.EORD/SM.EORD.Web/
  LOG: Initial PrivatePath =   D:\Documents\Projekti\TFSProd\eOrdering\Main\Source\SM.EORD\SM.EORD.Web\bin
  LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary    ASP.NET Files\eorddev\883938bb
  LOG: Cache Base = C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary   ASP.NET Files\eorddev\883938bb
  LOG: AppName = ad349442
  Calling assembly : (Unknown).
  ===
  LOG: This bind starts in default load context.
  LOG: Using application configuration file:   D:\Documents\Projekti\TFSProd\eOrdering\Main\Source\SM.EORD\SM.EORD.Web\web.conf ig
  LOG: Using host configuration file:   C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
  LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.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:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET   Files/eorddev/883938bb/ad349442/SM.EORD.Web.DLL.
  LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/eorddev/883938bb/ad349442/SM.EORD.Web/SM.EORD.Web.DLL.
  LOG: Attempting download of new URL file:///D:/Documents/Projekti/TFSProd/eOrdering/Main/Source/SM.EORD/SM.EORD.Web/bin/SM.EORD.Web.DLL.
  LOG: Assembly download was successful. Attempting setup of file: D:\Documents\Projekti\TFSProd\eOrdering\Main\Source\SM.EORD\SM.EORD.Web\bin\SM.EORD.Web.dll
  LOG: Entering download cache setup phase.
  LOG: Assembly Name is: SM.EORD.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  ERR: Invalid assembly platform or ContentType in file (hr = 0x8007000b).
  ERR: Setup failed with hr = 0x8007000b.
  ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
  
  *** Assembly Binder Log Entry  (23.3.2016 @ 9:51:19) ***
  
  The operation failed.
  Bind result: hr = 0x8007000b. An attempt was made to load a program with an incorrect format.
  
  Assembly manager loaded from:   C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
  Running under executable  C:\WINDOWS\SysWOW64\inetsrv\w3wp.exe
  --- A detailed error log follows. 
  
  === Pre-bind state information ===
  LOG: DisplayName = SM.EORD.Web
  (Partial)
  WRN: Partial binding information was supplied for an assembly:
  WRN: Assembly Name: SM.EORD.Web | Domain ID: 3
  WRN: A partial bind occurs when only part of the assembly display name is provided.
  WRN: This might result in the binder loading an incorrect assembly.
  WRN: It is recommended to provide a fully specified textual identity for the assembly,
  WRN: that consists of the simple name, version, culture, and public key token.
  WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
  LOG: Appbase = file:///D:/Documents/Projekti/TFSProd/eOrdering/Main/Source/SM.EORD/SM.EORD.Web/
  LOG: Initial PrivatePath = D:\Documents\Projekti\TFSProd\eOrdering\Main\Source\SM.EORD\SM.EORD.Web\bin
  LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\eorddev\883938bb
  LOG: Cache Base = C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary  ASP.NET Files\eorddev\883938bb
  LOG: AppName = ad349442
  Calling assembly : (Unknown).
  ===
  LOG: This bind starts in default load context.
  LOG: Using application configuration file:   D:\Documents\Projekti\TFSProd\eOrdering\Main\Source\SM.EORD\SM.EORD.Web\web.config
  LOG: Using host configuration file:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
  LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.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:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET   Files/eorddev/883938bb/ad349442/SM.EORD.Web.DLL.
  LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/eorddev/883938bb/ad349442/SM.EORD.Web/SM.EORD.Web.DLL.
  LOG: Attempting download of new URL file:///D:/Documents/Projekti/TFSProd/eOrdering/Main/Source/SM.EORD/SM.EORD.Web/bin/SM.EORD.Web.DLL.
  LOG: Assembly download was successful. Attempting setup of file: D:\Documents\Projekti\TFSProd\eOrdering\Main\Source\SM.EORD\SM.EORD.Web\bin\SM.EORD.Web.dll
  LOG: Entering download cache setup phase.
  LOG: Assembly Name is: SM.EORD.Web, Version=1.0.0.0, Culture=neutral,  PublicKeyToken=null
  ERR: Invalid assembly platform or ContentType in file (hr = 0x8007000b).
  ERR: Setup failed with hr = 0x8007000b.
  ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
  </code></pre>
  
  <p>Any idea?</p>
  
  <p>br, Simon</p>