Just a week into running on my new development box, Windows Server 2008 64, and everything had been smooth… until this bump in the road. While writing a utility COM component to extend ArcGIS Server, I ran into a serious gotcha. The issue actually was exposed while I was writing/running unit tests. Spinning up any ArcObjects in my tests were failing with the following runtime error:
System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {E01BE902-CC85-4B13-A828-02E789E0DDA9} failed due to the following error: 80040154.
ArcObjects for .NET uses managed COM interop assemblies to access the 32-bit COM objects (unmanaged C++ core ArcObjects libraries). So, turns out the test project’s “Platform Target” property was set to “Any CPU”.
The Fix?
Change the project’s “Platform Target” property from “Any CPU” (VS defaults to this) to “x86”.

