This is the output that I get from TFS Build when trying to publish my custom made trx file to the build that is running:
Running C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools..\IDE\MSTest.exe /publish:”http://tfsserver:8080/tfs/SpikeCollection” /publishresultsfile:”D:\Projects\TFSBuild\1\test\TestApp\Binaries\username_pcname 2011-11-08 02_30_04_Mixed Platforms_Debug.trx” /publishbuild:”bpTestApp_20111108.13″ /teamproject:” test” /platform:”Mixed Platforms” /flavor:”Debug”
Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved. Waiting to publish… Publishing results of test run username_pcname_2011-11-08_02_30_04_Mixed_Platforms_Debug to http://tfsserver:8080/tfs/SpikeCollection… .The path is not of a legal form. Publish failed or canceled.
I found the problem on my own question. I forgot to add the section TestSettings in the begin of the trx xml. The moment I added this it was possible to publish the results to TFS