I'm using TeamCity Professional for building and testing my code continually.
I have some MSTest based tests that work fine in VS2010 on my PC but fail on the build server.
I snooped around and discovered that upon testing, TeamCity creates a temporary directory in it's TEMP_DIR
(configurable) and copies only the "first relation" dependencies to the test DLL.
For instance: my test uses NHibernate.dll
which is copied to the temp directory but its dependencies (i.e NHibernate.ByteCode.Castle
) don't get copied, and the test fails with an IO.FileNotFound
exception.
Is there any way I can just run the tests from the test projects output directory (Test/bin/debug)?
If not, how can I specify which DLLs should be copied to the temp directory?
You can add a TestSettings file in your solution that will describe all the files to deploy.
First, add a TestSettings file. Open it, and in the "Deployment" tab, add all the file you need (your .dll). Then on TeamCity, in the MSTest build step, specifiy the TestSettings file to use in the "Additional command parameters" area. Exemple: "/testsettings:Local.Testsettings"
This way, all the files you specify in the deployment items will be copied in the temp directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With