Ok, I just wanted to add to the answer with this explanation:
1) In my project, I had links to: Microsoft.SharePoint Microsoft.SharePoint.Publishing
2) On the x64 virtual moss 2007 server, when I compiled my project, I added the following files to my bin / debug: ssocli.dll, Microsoft.SharePoint.Portal.SingleSignon.dll, Microsoft.SharePoint.Search.dll, Microsoft.SharePoint .Search.xml, Microsoft.Office.Server.Search.dll.
Interestingly, I did not have this problem on my x86 virtual server.
3) All these files can be found in the files c: \ program \ Common Files \ Microsoft Shared \ Web Server Extensions \ bin \ ISAPI.
4) According to the answer I found on the MSDN forum, referencing DLLs probably refer to or depend on additional DLLs. Because of this, they are added to the bin / debug folder.
5) To prevent this from happening, you can reference the dependent DLLs in your project and set the local copy to false.
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/192fa94c-b588-401d-8ca8-845c3fe15f60/could-not-load-file-or-assembly-microsoftsharepointsearch-version12000-cultureneutral?forum= sharepointdevelopmentlegacy
source share