none
Could not load file or assembly 'Microsoft.CommerceServer.Internal.ContentListHelper'. Incorrect format error for 64 bit builds

    Question

  • When we trying to access the our Commerce Server 2007 site on a 64 bit environment, we are presented with the following error message:


    "Could not load file or assembly 'Microsoft.CommerceServer.Internal.ContentListHelper' or one of its dependencies. An attempt was made to load a program with an incorrect format."

     

    This error is being caused by a copy of Microsoft.CommerceServer.Internal.ContentListHelper.dll (x86 version) being incorrectly placed in the output directory during the build process and/or when adding a reference to the Microsoft.CommerceServer.Runtime assembly.

     

    On 32 bit builds this isn't an issue, but on 64 bit builds it means that the application tries to load the 32 bit version rather than the 64 bit version (as the dll in the bin directory takes precedence over the one in the GAC). This results in the incorrect format error.

     

    The workaround is to simply delete the Microsoft.CommerceServer.Internal.ContentListHelper.dll assembly from the bin directory, so that the correct 64 bit version that resides in the GAC is used.

     

    Is a hotfix available to address this bug?

    Is it possible to have this addressed for Commerce Server 2007 SP2?

     

    Thanks in advance

     

     

     

    Chris

    Monday, January 14, 2008 4:37 PM

Answers

  • When you build your assembly you can safely remove the 86 bit version of the ContentListHelper.dll and the correct version will be used in the GAC.

     

    -Max

    Monday, January 14, 2008 4:45 PM
  • Chris,

    In your VS solution, set CopyLocal = false for 'Microsoft.CommerceServer.Internal.ContentListHelper.dll'.  This will prevent the assembly from being included in the bin directory.  The CS runtime will load the x64 version from the GAC as Max indicated.

     

    Tom Schultz

     

    Monday, January 21, 2008 7:10 PM

All replies

  • When you build your assembly you can safely remove the 86 bit version of the ContentListHelper.dll and the correct version will be used in the GAC.

     

    -Max

    Monday, January 14, 2008 4:45 PM
  • Chris,

    In your VS solution, set CopyLocal = false for 'Microsoft.CommerceServer.Internal.ContentListHelper.dll'.  This will prevent the assembly from being included in the bin directory.  The CS runtime will load the x64 version from the GAC as Max indicated.

     

    Tom Schultz

     

    Monday, January 21, 2008 7:10 PM
  • But what if the dll is not referenced in my solution? Why does it being built?
    Wednesday, April 24, 2013 6:53 AM