1
votes

I am getting the Following Error 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,

Though I have added the required Share point refernece and also modified the project setting , set the CPU as Any CPU.

still the error is coming. kindly help

3

3 Answers

1
votes

YOu are trying to use an x86 version of the dll instead of the x64 version or vice versa probably.

1
votes

Are you developing on a 64bit machine for WSS3 or MOSS 2007? If so, you will run into these problems, and Microsofts recommendation is to switch to a 32bit machine for development, but you can still deploy to a 64bit machine with no issues.

How should I create a good environment for .Net development for Sharepoint?

0
votes

Set Copy Local = False in reference properties