First off a little background information:
We are migrating to a new development build server.
- Old server is running TeamCity 4.x on Windows Server 2003 (x32) using HSQLDB database. Oracle 10.2 client. No Problems encountered.
- New servier is running TeamCity 5.x on Windows Server 2008 (x64) using HSQLDB database (planning on migrating to Oracle after current issue is resolved). Oracle 11.1 x64 client.
Here is an overview of the specifc build configuration that I am having problems with:
- Version Control System: SVN
- Build Runner: MSBuild, .NET Framework 3.5
- Outline of MSBuild Tasks
- Perform Compile
- Execute NUnit Tests
- Tests execute application code that accesses an Oracle database via Ibatis Data Mapper.
We are having an extremely odd problem on the new server that only manifests when running the NUnit tests in an MSBuild project within TeamCity. Running the tests within Visual Studio or directly in MSBuild from a command prompt are successful.
In a nutshell, the runtime is not able to load in the Oracle.DataAccess.dll, but only within TeamCity. Snippit of error generated from IBatis is below
"...Could not load file or assembly 'Oracle.DataAccess, Version=22.214.171.124, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format..."
We have tried many different types of troubleshooting activites from trying different versions of the Oracle client (32 vs 64 bit), tweaks within the project references, etc. to no avail. The really odd thing is that this only occurs when running from within TeamCity.
The question would be why do the NUnit tests fail (i.e. underlying Oracle load problem) in TeamCity initiated MSBuild but succeed when MSBuild is executed from a command window?
Any guidance or assistance regarding how to troubleshoot this problem from a TeamCity perspective is greatly appreciated.