One of my c# project refers to a COM module. When I built it on my new machine installed with Win7 x64, it failed to compile correctly. With diagnosis, found out the cause: the com module failed to be registered into Reg (regsvr32 /s xx.dll). I turned off UAC, but still got failure.. until making a machine restart.
So the tip here is: it should be due to not enough access right to registry about com module registration failure. So check whether your operation have enough admin rights or not in that case.