Archive

Archive for the ‘TFS 2010’ Category

Rename TFS Work Item Type

May 15, 2013 Leave a comment

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

TFS 2010 Build ‘Partially Succeeded’ (Failed) without reporting any error

July 18, 2012 Leave a comment

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.

 

 

A Better Build Explorer for TFS 2010

July 10, 2012 1 comment

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 :  http://buildexplorer.codeplex.com/downloads/get/379077

As it is opensource, you can also contribute. :-)

Clear Team Foundation Server Data cache

July 6, 2012 1 comment

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.

4. Done.

For more details refer to following MSDN Article : http://msdn.microsoft.com/en-us/library/ms252458.aspx

TFS 2010 : Troubleshooting high processor usage by data tier

March 30, 2012 Comments off

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.

http://blogs.technet.com/b/rob/archive/2009/02/18/performance-dashboard-reports-for-sql-server-2008.aspx

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.

Delete files permanently in TFS

February 10, 2012 Comments off

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>

TFS 2010 : How to Videos

September 9, 2011 Leave a comment

MSDN has many videos that show how you can use Visual Studio ALM tools and Team Foundation Server to help your team develop software more successfully. Here is the list of most important ones

TFS 2010 & VS ALM Videos

TFS 2010 : Training Kit

September 9, 2011 Leave a comment

New to TFS 2010? Where to Begin?

Here is the answer to these questions.  Here is a Training Kit, which is designed to help you understand what TFS 2010 can do for your organization and software process.  It applies to all members of the team – developers, testers, business people and of course, managers.

This training kit will give a glimpse of what TFS 2010 is all about. Download your kit here.

Troubleshoot : TFS Build 2010 : Build agent is currently reserved for a build

September 9, 2011 Leave a comment

I configured three build agents on the same machine with same configuration (lets say A1, A2, and A3). I reserved A1 and A2 for some builds say B1 and B2 using build definition process configuration. Everything worked fine till I deleted those builds (B1, B2) as I was experimenting with them. Now once I deleted them, reserved build agents A1, A2 were there but were not doing any thing. For example if I queued 3 builds at a time they were being processed by only A3. So I thought of deleting these build agents. Adding salt to wound I was not able to delete that, showing a dialog with message

---------------------------
Team Foundation Build Configuration
---------------------------
Cannot delete agent 'A3': The build agent A3 cannot be removed from build controller C1 because it is currently reserved for a build.
---------------------------
OK
---------------------------

On my pursuit to solve this issue, I ended up exploring TFS 2010 db for my project collection and here is what I found.

“tbl_BuildAgentReservation” is the table which retails the reservation details.

“tbl_BuildAgent” the refers to PK of  tbl_BuildAgentReservation for reservation ids against build agent entries.

So, these two tables maintains that blocking link. Once you break it, issue is resolved. And I did the same. Following are the queries you can run to break this reservation.

SELECT * FROM tbl_BuildAgent

Locate the build agent in question then note the value of ReservationId and AgentId and Execute the following SQL statements:

DELETE FROM tbl_BuildAgentReservation WHERE ReservationId = [ReservationId]
UPDATE tbl_BuildAgent SET ReservationId = NULL WHERE AgentId = [AgentId].

Courtesy :

http://sleepcanwait.blogspot.com/2010/07/cannot-remove-build-agent-from-build.html

http://www.anujchaudhary.com/2011/06/tfs-2010-unable-to-stop-build.html

 

 

 

Follow

Get every new post delivered to your Inbox.