Hello,
I have Team Build installed and the builds are working fine. However, when ever we try to publish a test result to the build we always get the following error:
Status: Failed
Error Message: Publish operation failed.
What does that mean How can I fix it I can't seem to locate any logs or items in the event log.
Thanks,
Cindy

Error Publishing Test Result
lfutrell
Nicolas Lehuen
Have some more information. I enabled tracing in the web.config on the application server and tried another publish. Got the "Publish operation failed" in the VS IDE. However, the resulting log has the following information (to paraphrase the log):
Now this is where it fails.
[TB] [I, 11708, 5, 2005/10/27 10:43:28.754 4268390413997] w3wp.exe: SQL: select DropLocation from dbo.Builds where BuildUri = @buildUri
[TB] [I, 11708, 5, 2005/10/27 10:43:28.754 4268390418938] w3wp.exe: SQL: 1 rows returned
[TB] [V, 11708, 5, 2005/10/27 10:43:28.832 4268390731380] w3wp.exe:
PublishRun: Failed to publish the run. Attempting to clean up.
Why did the run fail to publish What can I do to get it to publish
It would seem that the clean up operation fails with the following error. Which would make sense out of why the system tells me that the results are already published when I try to publish the same result set again after a failed attempt.
[TB] [E, 11708, 5, 2005/10/27 10:43:28.926 4268391018150] w3wp.exe: Remove Run Data: Exception: Microsoft.VisualStudio.TestTools.Common.Warehouse.RunDoesNotExistException: Run is not in the Publish database.
at Microsoft.VisualStudio.TestTools.TeamSystem.Server.SqlAccess.RemoveRunData(Guid runId)
[TB] [W, 11708, 5, 2005/10/27 10:43:28.926 4268391032939] w3wp.exe: Caught exception removing run data. There is already an open DataReader associated with this Command which must be closed first.
Thanks again for your help.
R. Child
prasanna1579
oxomichael
Dalsom
Status: Failed
Error Message: The specified test run has already been published.
Federico Caselli
I'm not sure what you mean. Does what show up on the test run data after a refresh What should I refresh
Thanks,
Cindy
Nicky Chen
The root cause of the failure you were seeing is the fact that the build service and application tier accounts are different. This is a known issue that will be fixed for RTM.
The failure occurs when we try to set the permissions on the test results directory back to read-only. This fails unless the build directory was created using the application tier account. Making the application tier account an administrator or using the same account as the build service should resolve the problem.
Cheers,
Tom
Gulden
Code coverage is not enabled. And the build service and application tier are running with two separate accounts.
Thanks!
Cindy
newbie_
That is a great article. However, I have gone to the extreme and given everyone full control over the share, and the file system. I'm not sure if I can open up the permissions anymore!
At first I was getting access permission denied. But when I opened up the permissions I started getting a generic "Publish operaion failed" with no other information.
Thanks again for your help!
Robert Vis
Not sure what permission it needs that it didn't previously have. I gave that account full control over the drop directory (file system and share permissions).
But at least I have established that it is a permissions issue. If I figure out what permission it needs that I was missing, I'll post. If anybody has any ideas, I'm open to suggestions.
Thank you!
Cindy
Hmmm.... Threads......
mr_snubbex
Thanks,
Anu
Daniel P
Publishing results of test run teambuilderaccount@buildmachinename 2005-10-25 15:55:03_Any CPU_Release to http://teamfoundationserver:8080/Build/v1.0/PublishTestResultsBuildService.asmx...
Publish operation failed.
Interestingly enough a few lines up it says that the test run was completed and successful.
Test Run Completed.
Passed 2
---------
Total 2
The build machine and the team foundation server are different machines.