DLLNotFoundException when testing with Gallio with Rake runner.

Hi everyone, I can appreciate this question involves a number of technologies and is not necessary a TeamCity related issue but I would really appreciate it if anyone here can spare a bit of brain time and see if they can help... I've tired everything and I'm at a complete loss.

Here is the scenario.....

I have a couple of .NET projects. One project for the main applications UI, one project for the applications calculations (a DLL), and one for the tests for the calculations (a DLL). The calculation project doesn't do much and is really just a .NET wrapper around an older Win32 DLL.

Everything is good with the project. A local build with Visual Studio and Resharper shows the code compiling and the tests passing fine.

To make the build more automated I write a rake build script. This script calls MsBuild to compile the project and Gallio.Echo to run the tests. Again everything is fine and life is good.

All this is done locally so I upload the script onto a Windows Server 2003 64 bit machine and then run rake.... it's all still fine. I'm happy.

Now I go into TeamCity and create a project to automated this build. I set up the source control and set up the Rake runner (only specifying the rake file to run).

I manually run the build and *pow* I get a failure in the tests..... a DLLNotFoundException, the Win32 DLL that being wrapped can't be found.

If I run the build script with rake, from the command line on the server, in the agents work folder - which should be very similar to what TeamCity would do - it all builds lovely... as soon as TeamCity runs it, it cannot find the Win32 DLL.

I've tried all sorts of things... changing the system path, moving the DLL to the Gallio folder, running the agents under different credentials, everything I do doesn't work.

Anyone have any suggestions, comments, ideas? anything at all... is it a TeamCity problem, a Gallio problem, a Ruby problem.... is anyone thinking anything?

Many thanks,

del-bug

2 comments
Comment actions Permalink

Hi again,

I place the calculation DLL into "Windows", "Windows\System" and "Windows\System32" and the DLL is still not found.

These are the specified paths that Windows uses to resolve DLLs so I'm wondering does TeamCity do anything (as rake and Gallio.Echo seem fine) that stops or prevents Windows search for DLLs. Forgive my ignorance by is this something to do with Java?

0
Comment actions Permalink

Hi again folks,

I'm really sorry for spamming my own post.

It looks like it's a Gallio problem and something to do with path variables used by the TeamCity service user.... still post though if you feel you can offer me some positive (haha) advice....

love teamcity.

0

Please sign in to leave a comment.