1

We have a .NET solution that I'm trying to get to run in our new CI environment, TeamCity.

The solution builds and runs, and all unit tests run (not all pass, but that's a different story) on our dev machines.

It builds properly on the CI server as well, but when running the MSTest configuration, it fails, giving a message like:

Unable to load the test container '[one of my test assemblies]' or one of its dependencies.  Error details: System.IO.FileNotFoundException: Could not load file or assembly '[one of my assemblies]' or one of its dependencies. The system cannot find the file specified.

Well, my assembly is built and available, so that's unlikely. On my local dev machine, I can get more detail with procmon or the like to see where the dependency chain is broken, but I'm not sure how I can do that against a remote server.

How can I find out what my CI server is missing to do its job? Is there some logging I can enable or something?

6
  • IMHO the quickest way to solve this is to RDP to the CI machine using the account that TC runs under and try and run the build from where TC checked out the code
    – Sam Holder
    Aug 5, 2014 at 15:55
  • @SamHolder It works from there if I invoke it manually :( Aug 5, 2014 at 19:18
  • Bugger. Next thing I would do is to run the team City build with proc mon running. But you'll end up with a big trace to analyse.
    – Sam Holder
    Aug 5, 2014 at 19:26
  • Sorry does Ms test run from the command line on the build server Ok? Or just the build?
    – Sam Holder
    Aug 5, 2014 at 19:27
  • @SamHolder honestly I cannot figure out how to run it properly from the command line (I have multiple test projects)... but when specifying the target that blows up in TC, it does not throw an exception... it also does not run any tests. I don't know if that's good or bad. Aug 5, 2014 at 19:58

1 Answer 1

0

Sounds like the working directory is wrong when you are attempting to run tests.

Is your Build and Unit Tests steps in the same "Build Configuration"?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.