1
votes

all We just upgraded the TFS and build agent from 2013 to 2013 update 3, and our UT failed because MStest failing to publish results to TFS. I also tried to use command line on the build agent as follow "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe" /publishresultsfile:"C:\temp\Result _2014-08-12 11_38_49_.trx" /publish:"TFSUrl" /noprompt /publishbuild:"vstfs:///Build/Build/619" /teamproject:"TeamProjectName" /platform:"Any CPU" /flavor:"Release" and got the same error below

enter image description here

Also a windows event is raised as below

enter image description here

Another story 1, we have 2 build agents A and B, on the first day, we upgraded A and found MStest publish failed on A and succeed on B, on the other day after B was upgraded , both of them couldn't publish the UT results.

Another story 2, MSTest 2010 can publish the results on the Build agent successfully.

Do you have any idea? Thanks in advance!

1
The error points to some kind of mismatch between MSTest.exe and some required DLL. Could be that you have also Visual Studio installed and not upgraded? If you do not find any basic configuration problem, post the issue to MS forum where support can help you (and put the answer here also).Giulio Vian
Have you tried using vstest.console.exe instead of mstest.exe? If I recall mstest.exe is the old way of doing things.John Koerner

1 Answers

0
votes

I know this is not a final answer, but I walked around this issue, and currently my team build system worked well.

From the exception, I know this is a version-mismatch between managed assemblies (Microsoft.TeamFoundation.TestManagement.*) and un-managed dlls (not sure what are them). So I just tried to down-grade Microsoft.TeamFoundation.TestManagement.Common.dll and Microsoft.TeamFoundation.TestManagement.Client.dll from 12.0.30723.0 to 12.0.21005.1, and everything begin to work.