I've finally got Team City to run on Azure with the built-in database. But I was having terrible trouble getting my unit tests (MSTest) to run.
The error: 'Could not load file or assembly Autofac ...'
Every thing looked fine. Local build / test worked like a dream. NuGet packages loaded. CI build log showed Autofac was nu-get downloaded, and build success... I even fell back to RDP to build-box and run tests; again, success.
So what was the problem?
I used a simple short-hand to tell team city where the test assembly was: src/core.tests/**/*.tests.dll. This was (unexpected, by me at least) picking up both
- src/core.tests/bin/debug/core.tests.dll AND
- src/core.tests/obj/Debug/core.tests.dll
Fixing it
The fix is simple, just use a more exact setting in Team City src/core.tests/bin/Debug/*.tests.dll