While customizing TFS work item type we might feel like changing the work item type name itself. So there is an easy an fool proof way to achieve it thought command line. Here is the command
witadmin renamewitd /collection:”http://tfs-server-name:8080/tfs/collection-name” /p:Project-Name /n:”User Story” /new:”Job”
So the command mentioned above will change the name of ”User Story” work item type to “Job”.
For detailed help use witadmin renamewitd /?
Note: this command is applicable for both TFS 2012 and TFS 2010
It sounds very strange when a build fails without giving any error. Recently while working with TFS 2010 build, I came across same kind of scenario. It took my lot of time to locate the exact cause of error. But finally, I succeeding in locating it.
Here is how summary report looks like for such a build. Showing no error at all. Still failed. Check-ins rejected. Very Bad.
Now, I thought of exploring detailed build log and look for a keyword ‘Error’. That worked and I found the error. That error was actually in Unit Test Run. As following image shows all tests have passed but still some error is reported by MSTest.
Now, I went back to the summary page to open unit test run results.
Here, highlighted section on test results window show that some other error occurred as all unit tests passed. So, I intuitively clicked that link and located the exact cause of the error.
So, that helped me to answer the strange question i started with.
Recently, I came across this new project on codeplex. This looks simple but still it answers almost all usability issues with visual studio’s integrated build explorer. Issues like..
- Quickly Loading build history, with minimum clicks.
- Monitoring builds in progress
- Locating errors and warnings
- Easily going though huge build log.
I bet, if you are working with a huge number of builds in your organization as I do, you will immediately pin this tool to your taskbar.
It can be downloaded at :
As it is opensource, you can also contribute.
Each application tier for TFS maintains a file cache in order to help users to easily download their files. Now this is good. But over a period of time this folder grows and starts consuming lot of disk space. Some time back i faced this issue and found that cleaning this folder was the only option I had.
Though, it was not suggested anywhere but I took my chance and cleaned the data cache. Everything worked fine. As I deleted the cache folder itself, TFS also created this cache folder again. Yes our team faced some slowdown, but everything was normal after an hour.
Now how to clear tfs data cache?
1. Stop TFS application server.
2. Delete the folder Drive:\%programfiles%\Microsoft Team Foundation Server 2010\Application Tier\Web Services\_tfs_data. (If you are cautious, rename the folder rather than deleting it. For backup)
3. Start TFS application server.
For more details refer to following MSDN Article :
As the development teams grow, load on TFS also grows. Being a comprehensive ALM solution, it acts as single point of service for all stake holders in your organization. Just like heart TFS pumps in/out information into the veins of organization. So, data tier is most vulnerable to become a bottle neck in case load increases beyond limit.
One fine day in our organization we saw that SQL server started consuming >95% avg processor time. Which was started hitting our whole ALM implementation. Developers were not able to checkin, Builds were damn slow, reports were too slow to fetch data. We were totally clue less about what was happening there. We shot arrows in dark, in all directions. We were also looking into scaling up data tier at one point of time. But after two weeks of trouble shooting we were able to nail the issue, which was primarily due to one of our custom solution we build around TFS.
During this trouble shooting I came across lot of interesting ways to probe in to performance issue with TFS. Here are few very important i would like to share.
Monitoring TFS in coming requests
This can be an initial point one must look at as soon as performance issue strikes. Interestingly, TFS keeps a record of all in-coming requests. This can give a quick input in case issue is due to the increase in requests to TFS due to the increase in number of clients using tfs. But there is a job which runs fortnightly and deletes all request logs older than 14 days. So, that is why I said “as soon as you hit the performance issue”. TFS SQL database table “tbl_Command” keeps log of in-coming tfs requests. You can query it any time to check those interesting details.
SQL Server Performance Dash board
This is a life saver tool, I must say. It can answer all your questions on which query/Stored procedure is the main accuse of creating the performance issue with SQL server. This is from Microsoft. It installs a set of reports on database machine which run on database’s system tables or Database Management Views. Microsoft did not released this for SQL server 2005. So it will not work directly after installation. You have to do some steps to make it work for SQL Server 2008. Just refer to following url. Its easy.
Apart form these two methods we tried lot of other options, as I said “shot arrows in dark”. But, I am very sure that that methods mentioned above will give you enough inputs to resolve performance issue with TFS.
In TFS Source control you can not delete files permanently. Its just a temporary delete. Deleted folder/files can still be viewed from Team explorer through option called “show deleted items in source control explorer” from Tools > Options > Source Control > Visual Studio Team Foundation Server and then can be “UnDeleted” if required.
So, what if you want a permanent delete with NO recovery. This can be done using team foundation command line interface. Following is the syntax for the same.
tf destroy <path for TFS Item to be deleted> collection:<TFS Collection Name>