Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

"Could not load file or assembly" error when you compile a SDK application for Microsoft Dynamics SL 2011


View products that this article applies to.

Symptoms

When you compile a Microsoft Dynamics SL Software Development Kit (SDK) application on a 64 bit workstation in Microsoft Visual Studio 2010, you receive the following error:

Could not load file or assembly 'file:///C:/Windows/assembly/GAC_32/Interop.SAF/8.0.0.0__31bf3856ad364e35/Interop.SAF.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.


↑ Back to the top


Cause

There is an issue in Microsoft Visual Studio 2010 on a 64 bit workstations where it incorrectly assumes various DLL files (such as Interop.SAF) are 64 bit when they are in fact 32 bit.

↑ Back to the top


Resolution

There are several options to work around this issue:

  1. Use a 32bit workstation to compile the Microsoft Dynamics SL Software Development Kit (SDK) application.
  2. Use Microsoft Visual Studio 2008 instead
  3. Follow any of the three additional workarounds detailed in the following MSDN blog posting:
    http://blogs.msdn.com/b/visualstudio/archive/2010/06/19/resgen-exe-error-an-attempt-was-made-to-load-a-program-with-an-incorrect-format.aspx

↑ Back to the top


Keywords: kbmbsmigrate, kbmbspartner, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2685054
Revision : 2
Created on : 2/3/2017
Published on : 2/3/2017
Exists online : False
Views : 201