Could Not Load File or Assembly

Many reader of this bog will definitely think about this post being published because this is an IT blog, not a web development blog or a forum. I would like to make a point that IT is not the name of only installation and configuration of operating system and server but its the name of a complete IT system where deployment of new applications and component even being developed under the development house also included. I was deploying a project where we have to deploy it on a 64bit Windows 2008 server when we faced this issue and it almost took more than a day to figure out and solve this problem.

This problem may arise when you are developing the application on a 32bit windows architecture and deploying on a 64bit windows architecture. We faced this issue while deploying a FAX project to send the fax using our own application.

Could not load file or assembly ‘Interop.FAXCOMEXLib, 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.

Solution is very simple, follow the under given instructions.

  1. Open the project in Visual studio 2008 or 2010 (whatever you are using for development)
  2. Right click on the project and Go to Properties
  3. Go to Built Tab and Select the Platform Target Combo Box
  4. Select x86 and rebuilt your project

platform target

4 thoughts on “Could Not Load File or Assembly”

  1. This didn’t worked for my application… and getting below error for web application ..while same reference is working for Console application

    ————
    Could not load file or assembly ‘BMC.arnettoc.DLL’ or one of its dependencies. The specified module could not be found.

    —————-

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.