Please open up a support incident with customer care for this issue as we will most likely have to get traces from you, etc.
The rebuild utility uses the same run-time system and licensing as your application would so if the rebuild runs without a problem then it means the licensing is setup correctly and it is something with your specific application that may be causing a problem.
Is it possible that you create a simple native .exe hello world program and see if that runs on your server?
Thanks.