Using the Typemock TFS 2012 Build activity I created I had started seen the error
TF900548: An error occurred publishing the Visual Studio test results. Details: ‘The following id must have a positive value: testRunId.’
I thought it might be down to having patched our build boxes to TFS 2012 Update 1, maybe it needed to be rebuild due to some dependency? However, on trying the build activity on my development TFS server I found it ran fine.
I made sure I had the same custom assemblies and Typemock autorun folder and build definition on both systems, I did, so it was not that.
Next I tried running the build but targeting an agent not on the same VM as the build controller. This worked, so it seems I have a build controller issues. So I ran Windows update to make sure the OS was patched it to date, it applied a few patches and rebooted. And all was OK my test ran gain.
It does seem that for many build issues the standard switch it off and back on again does the job