When you create a build type for a team project on TFS you can enable testing using MSTest by saying ‘run any tests that are found in a given DLL’. I used this today to create a CI build for a project, I am looking at using Team Build as opposed to CruiseCrontrol as we have done historically.

I hit a problem that the tests were running but the build was failing (or in Team build speak - partial succeeding i.e. compiling but not passed testing). On looking in the build log I saw the error was:

The results directory “\servertfsdropRel1.0.0TestProject_20080612.1TestResults” could not be created for publishing

So this looked like a rights issue, but my DomainTFSBuild user (which the build process runs under) has full permissions to the drop directory (and it’s associated share) and it was happily creating the other directories for the drop share.

Turns out the answer was to also give the DomainTFSService (used by the Appliction Teir) full access to the drop share. Once this is done all is OK