locked
MOSS 2007, Win 2003 64 bit, Microsoft,sharepoint.search reference Issue RRS feed

  • Question

  • My OS is Win2003 64 bit, MOSS 2007,VS 2005  and added a refeerence to Microsoft.sharepoint, get the following errror message:

    Could not load file or assembly 'Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format

    I tried adding reference to 'Microsoft.SharePoint.Search as well but still get a bad image exception.Have enabled 32 bit compatibility on IIS as well using following command on IIS 6.0
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

    and also set the platform setting in VS 2005 to any CPU


    and still get folloing exception:

    System.BadImageFormatException: Could not load file or assembly 'Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format

    Please advice.
    Tuesday, May 26, 2009 8:38 AM

All replies

  • The initial VS05 installation did not add support for x64 by default, you had to choose custom installation.

    In VS05 When you right-click on the ProjectName in Solution Explorer, click on Build on the left navigation then choose the drop down for Platform target below Any CPU is x64 listed?

    Is the the search dll referenced correctly in the GAC or is copy local set to true? Right Click on the refrence and check to see if local copy is set to true, should be false?

    What version of NET are you using to develop with?

    Have you tried remote debugging and does it run locally?



    -Ivan


    Ivan Sanders http://linkedin.com/in/iasanders http://dimension-si.com/blog
    Tuesday, May 26, 2009 9:39 AM