Getting an intermittent Publish_RunHasAlreadyBeenPublished error

Jun 1, 2011 at 8:50 AM

Hey!

We are using NUnit for Team Build on our 2008 TFS build server. We are occasionally getting the following error when converting the output:

Command:  
"C:\xxx\BuildType\..\Sources\Project\tools\NunitToMstest\NUnitTFS.exe" -n "C:\xxx\BuildType\..\Sources\Project\unit_tests_results.xml" -t "Project" -b "CI_BUILD_20110601.1" -f "Release" -p "Any CPU" -x "C:\xxx\BuildType\..\Sources\Project\tools\NunitToMstest\NUnitToMSTest.xslt"  
Transforming NUnit output...  
Loading XSLT from C:\xxx\BuildType\..\Sources\Project\tools\NunitToMstest\NUnitToMSTest.xslt  
Loading NUnit Output from C:\xxx\BuildType\..\Sources\Project\unit_tests_results.xml  
QueryBuilds  
GetVersion  
PrepareToPublish  
System.InvalidOperationException: PrepareToPublish failed: Publish_RunHasAlreadyBeenPublished     
at KWatkins.NUnitTfs.Publisher.PrepareToPublish(String buildId, Guid runId, Boolean overwrite) in D:\Development\NUnitTFS\NUnitTFS\Publisher.cs:line 76     
at KWatkins.NUnitTfs.Publisher.Publish() in D:\Development\NUnitTFS\NUnitTFS\Publisher.cs:line 45     
at KWatkins.NUnitTfs.Program.Main(String[] args) in D:\Development\NUnitTFS\NUnitTFS\Program.cs:line 19
C:\xxx\BuildType\TFSBuild.proj(92,5): error MSB3073: The command ""C:\xxx\BuildType\..\Sources\Project\tools\NunitToMstest\NUnitTFS.exe" -n "C:\xxx\BuildType\..\Sources\Project\unit_tests_results.xml" -t "Project" -b "CI_BUILD_20110601.1" -f "Release" -p "Any CPU" -x "C:\xxx\BuildType\..\Sources\Project\tools\NunitToMstest\NUnitToMSTest.xslt"" exited with code 1.


Not sure what is causing it - might be to do with the autogenerated *.trx filenames you use already being taken? 

Thanks

Jen