views:

1287

answers:

2

Hello!

While building our project on the Build Server, the compilation fails with the error message:

TlbImp: error TI0000 : The input file 'C:\*.dll' is not a valid type library.

We tried to manually invoke the TlbImp command thru the VS2005 Command Prompt and the same error message appeared.

To investigate, we tried to create a clean build environment in a Virtual Machine (Vbox), then we run the build there. It went fine.

We also tried to invoke the same TlbImp command thru the VS2005 Command Prompt and it succeeded.

With that, we are assuming that there is nothing wrong with the DLL. Do you have any idea what scenario(s) can cause this problem?

EDIT: Found the problem, see my answer. ;)

+1  A: 

If it is working on one machine and not on the other, then most probably some dependency of this DLL is missing in your machine. Inspect the dll through DependencyWalker and you will get to know that which dependency hasn't been built properly.

Aamir
A: 

After closer inspection, we found out that the environment variables on the official build server is FUBAR.

The official build server was installed with both VS2003 and VS2005. Our project is VS2005. The build script is using components from VS2003 instead of VS2005 because the VS2003 paths (Path, LIB, LIBPATH and INCLUDE) were first declared before the VS2005 paths.

A simple SET command to override the environment variables with the "correct ones" fixed the build!

Thanks!

Ian