Sharepoint - Why is Microsoft.SharePoint.Search.dll copied in my project?

I believe this happens because Microsoft.SharePoint.dll uses it as a dependency. As Microsoft.SharePoint.Search.dll is not in the GAC, Visual Studio copies it to the bin folder.


Alex is correct, if you want to stop this happening you can use this hack:

  1. Add a reference to Microsoft.SharePoint.Search.dll (in the 12\ISAPI directory)
  2. Select and in the Properties page set Copy Local = false

This makes it easier when you want to do post build events like coping DLL around.