I have a test that fails when run from TeamCity but doesn't fail anywhere else.
The test runs fine on my dev machine. The test runs fine when I run the test from the command line on the build agent machine where the test ran that failed inside TeamCity. It even runs just fine on the build agent machine when I load the test results from "C:\BuildAgent\temp\buildTmp" into Visual Studio and rerun the test with the assemblies that were used during the TeamCity build.
The build agent service is running from the same account that I use to log into the build agent machine to do my experiments.
It is very strange and I can’t figure out what is different between the run in initiated by TeamCity and every other run. In one case an exception is being thrown from what looks like a Keyboard handler inside of WPF and everywhere else there is no exceptions being thrown. Anyone have any ideas what could be different and causing this issue?