Referencing Sharepoint Assemblies on x64bit Installs causes build errors for ASP.NET apps (in VS.NET 2005)

You may encounter the following error if you are trying to build a ASP.NET application or web service on a x64bit machine where Sharepoint is installed: Error 1 Could not load file or assembly ‘Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. The system cannot find the file specified. C:\Documents and Settings\robgruen\My Documents\Visual Studio 2005\WebSites\MyWebService\Web.Config What happens…

1