TRX file missing???

Jul 23, 2010 at 3:24 PM

For some reason the PublishRun step fails and when i check the folder it is empty where the TRX file should be...any thoughts?




Task "Exec" 
  "C:\Program Files\MSBuild\NUnit For Team Build\NUnitTFS.exe" -n "c:\tmp\aRisk\BuildName\Binaries\Release\nunit_results.xml" -t "aRisk" -b "BuildName_20100723.3" -f "Release" -p "Any CPU" -x "C:\Program Files\MSBuild\NUnit For Team Build\NUnitToMSTest.xslt"

  Transforming NUnit output... 
  Loading XSLT from C:\Program Files\MSBuild\NUnit For Team Build\NUnitToMSTest.xslt 
  Loading NUnit Output from c:\tmp\ProjectName\BuildName\Binaries\Release\nunit_results.xml 
  Writing TRX file to \\myserver\builds\MiddleTier\BuildName_20100723.3\TestResults\07da0717-0a26-2400-91c4-30db1d215203\NUnitOutput.trx

  System.InvalidOperationException: PrepareToPublish failed: Publish_GeneralFailure 
     at KWatkins.NUnitTfs.Publisher.PublishRun(String buildId, Guid runId) in D:\Development\NUnitTFS\NUnitTFS\Publisher.cs:line 63

     at KWatkins.NUnitTfs.Publisher.Publish() in D:\Development\NUnitTFS\NUnitTFS\Publisher.cs:line 52 
     at KWatkins.NUnitTfs.Program.Main(String[] args) in D:\Development\NUnitTFS\NUnitTFS\Program.cs:line 19 
c:\tmp\aRisk\LimitService_ParamV1\BuildType\TFSBuild.proj(53,5): error MSB3073: The command ""C:\Program Files\MSBuild\NUnit For Team Build\NUnitTFS.exe" -n "c:\tmp\aRisk\BuildName\Binaries\Release\nunit_results.xml" -t "aRisk" -b "BuildName_20100723.3" -f "Release" -p "Any CPU" -x "C:\Program Files\MSBuild\NUnit For Team Build\NUnitToMSTest.xslt"" exited with code 1.

Done executing task "Exec" -- FAILED.


Jul 23, 2010 at 4:14 PM

Additional thought....could this be because NUnit didn't find any tests to run?



The "NUnit" task is using "nunit-console.exe" from "C:\Program Files\Nunit 2.5.5\bin\net-2.0\nunit-console.exe". 
  ProcessModel: Default    DomainUsage: Single 
  Execution Runtime: net-4.0 
  Tests run: 0, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0 seconds 
    Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0 
Done executing task "NUnit".


Aug 3, 2010 at 4:11 PM

The problem is something to do with TFS although I have no idea what I'm afraid. "Publish_GeneralFailure" is the error message returned by TFS when something goes wrong, however it doesn't give any information...

It might be that the resultant .trx file is malformed in someway; that would give a Publish_GeneralFailure. Could well be because you have no tests running - I never tested for that! Can you try it with at least one test running and see what happens?

Aug 3, 2010 at 4:55 PM
It turns out that it was NO tests running that caused this issue although I would think that not having tests run shouldn't FAIL but rather skip the step? Thanks for your help!