Wednesday, April 15, 2009

TFS – Getting more information about errors when running TFS Admin utilities

When running TFS admin tools and if you encounter errors, the error messages are cryptic and mostly useless.

But here is a setting that will allow you to see more of the error information (sometimes even the stack trace) that will make it a lot more easier to track down errors.

At the command prompt run “Set TfsDetailedErrors=1”, before you run any of TFS admin tools. When you run a TFS admin tool after setting this environment variable, you will start getting a ton more information regarding errors.

Case in point. I was getting the TF55030 error whenever I ran RenameDT

ERROR: TF55030: Rename Data Tier failed.  Please verify that the supplied Data Tier name is a valid Team Foundation Data Tier name,
that the Data Tier can be accessed on the network and that you have administrative rights.

The error message does not give much information about why RenameDT was failing. In fact it was pointing me in the wrong direction by stating that it might be an administrative rights issue.

After setting TfsDetailedErrors to 1, I get the complete stack trace as well as the following message:

System.Net.WebException: The remote name could not be resolved: 'tfsrtm08'

That was weird because I was trying to rename the Data Tier from tfsrtm08 to tfsrtm0801 and the server tfsrtm08 did not exist any longer. So this was obviously not a permissions issue. But probably a bug in Microsoft’s code. More about the error itself will come in another post. But for now, just know that TfsDetailedErrors is your friend.

No comments: