NodeJS, Java and .NET Build Automation with VSTS (VSO, TFS)

December 6, 2015 TFS, Videos , , , , ,

Have you tried Visual Studio Online (or Visual Studio Team Services, as it is now called) for build automation? VSTS (TFS 2015) has a new and much powerful build engine than TFS 2013 and you can now configure build automation for NodeJS, Java, Android, XCode and .NET.

The video recording below is a quick guide to configure Cross Platform Build Automation with VSTS or TFS 2015 (on-prem)


Direct Link:–TFS-2015

Channel9 – DevOps: Continuous Delivery using Visual Studio Online and Azure

June 22, 2015 Azure, Sessions, TFS, Videos, Visual Studio , , , , ,

I am glad to say that my webcast, that I delivered as part of Southeast Asia MVP ComCamp 2015, has been published on MSDN Channel9 

The session outlines the best of cloud world – ALM and Continuous Delivery into Azure platform.  The session will focus on configuring VSO, developing applications using VS2015 and running continuous integration (unit tests) and auto deploying the code to Azure Staging and Production platforms.

Direct link:



[Solved] The connection to Team Foundation Server has been restored

June 3, 2014 TFS


The connection to Team Foundation Server http://…… has been restored

Root cause

The Build Notification application tries to connect to TFS server to get build definitions and their status and gets an error. This error can also occur if one or more build definitions do not exist on the TFS server. This is because the Build Notification area tries to query TFS server with each build definition instead of fetching the definitions at every attempt.


In the Build Notification application, go to Configure Build Notification. Uncheck all the builds that have been deleted from the TFS server. You may also uncheck the disabled builds to make sure that build.

This should resolve the connection restoration popup in the taskbar.

Recording: Continuous Integration with TFS

May 11, 2014 ALM, Azure, Sessions, TFS, Videos, Visual Studio , , , , ,

I had recently done a webinar on DevOps – Continuous Integration with TFS which was organized by Microsoft.
If you missed it for any reason, you can watch the recording on Youtube channel.

The duration of the video is 1 hour and will delve into various aspects of ALM such as

  • Product Backlogs and SPRINT
  • Integration with Visual Studio
  • Unit Testing (with MSTest)
  • Build Automation and Check-in policies
  • Deployment into Azure (for Azure Websites)

Webinar – DevOps: Continuous Integration with TFS

April 28, 2014 ALM, Sessions, TFS , ,

Speaker: Punit Ganshani
Topic: DevOps: Continuous Integration with TFS
Date & Venue:  May 07, 2014 (Wednesday) at 6:00 PM to 6:45 PM (SGT)
Venue: Online (Lync Meeting)

What are we going to cover? This is what you can get!
Team Foundation server
  • Our MVP will share about what’s new in TFS 2013
  • DevOps – Continuous Integration and Deployment using TFS 2013
  • TFS best practices
Questions and Answers Ask the MVP

Use this opportunity to our MVP and the Microsoft team your toughest question on Team Foundation Server 2013!

Register below or at


[Solved] TF246017: Team Foundation Server could not connect to the database

April 25, 2014 ALM, TFS, Visual Studio , , ,


TF246017: Team Foundation Server could not connect to the database.
Verify that the server that is hosting the database is operational, and that network problems are not blocking communication with the server.

Root Cause

This error can occur due to following reasons

  • Incorrect SQL Installation order especially if you are using Express edition
  • Database In Recovery
  • Database Out-of-Sync – during migration to newer version of TFS
  • Permission of Service Account is not right
  • SQL Database not running or not reachable
  • TFS Proxy not reachable


If your database server has restarted and you are trying during that time, you may face this issue. You may want to take a cup of coffee and retry after sometime.  If the error still persists, you can try debugging the below.

Check if you are able to connect to SQL database by yourself.  If you are not aware of the database connection, it is advisable to reach out to your support team in your organization to check the connectivity. 

If this issue arises only when you are checking in or doing an undo pending changes, chances are that SQL Server has logical consistency I/O error.  You can try repairing the database (or request your DBAs to do it for you) by running following command against all TFS databases


If there are database errors, your DBA should be able to resolve it. 
If there no database errors, then you need to check if the service account through which the TFS services are running (on TFS server) has same credentials and if the permissions granted are correct.  You may want to sync-up the services

If you have migrated TFS / database, you may want to check if backup of all databases is restored.  Partial restoration of backups also can cause this issue.  You can refer to the MSDN link of list of TFS databases.  This list may differ based on version of TFS.

[Solved] TF250061: The following site could not be attached to Team Foundation Server

April 16, 2014 TFS, Visual Studio , ,


TF250061: The following site could not be attached to Team Foundation Server:
The site is already associated with a team project on an installation of Team Foundation Server with a different ID.

Root Cause

When a TFS site collection is associated with both TFS 2010 and TFS 2012/2013


This problem occurs only when you have migrated to a newer version of TFS while your collection is still attached to older version of TFS.  You can fix it by going into the old TFS installation via Team Explorer in Visual Studio, and re-associating the project with it’s project portal.


Select Portal Settings in Team Explorer and disassociate from older version, and then attach to the newer TFS version.


[Solved] TF31001: Cannot connect to Team Foundation Server

April 10, 2014 TFS, Visual Studio , ,


TF31001: Cannot connect to Team Foundation Server at
The server returned the following error: Key not valid for use in specified state

Root cause

Expired token due to change in Windows credentials (Active Directory for Enterprise hosted TFS and Live credentials for Visual Studio Online)


Team Foundation Server when using Visual Studio 2013 stores token based on Windows credentials (Active Directory / Live credentials) in Windows Registry.  For example, I’m connected to 2 Visual Studio Online repositories, so you can see 2 keys in VssApp


Now when you change the credentials, in most cases this error will not come as Visual Studio will try to re-authenticate you and update the token.  However in case of any failures, you may get the error TF31001.

To resolve this,

  • Close all instances of Visual Studio
  • Run Task Manager and find out all TFS services.  Click on End Process Tree to shut down all the services
  • Delete just the TokenStorage folder:


  • Restart Visual Studio and retry

Build Automation using Jenkins and TFS version control

March 26, 2014 TFS, Visual Studio , , , ,

I’ve used several version control systems for my source code and research projects.  Recently, I’ve consolidated them to TFS and Git. I have started using Visual Studio Online for my research work, CodePlex for my Open Source Frameworks and Tools and GitHub for my blog code.  Much of these decisions are driven based on the target audience and the nature of my work (code).  TFS, being an excellent ALM tool, offers more than just a version control system which can be particularly helpful when you are either having large teams to work with or have an open-source project whose build you would want to automate.  For my research development (that happens at home), I was keen on build automation for CInject project.

Visual Studio Online offers a complete package of Continuous Integration and Delivery to Azure Services but there is no such feature for TFS repositories of CodePlex.  For this case, I started evaluating other CI platforms like CruiseControl.NET, TeamCity and Jenkins.  I zeroed down on Jenkins for its ease of use, extremely light-weight deployment, my familiarity with it and zero-dollar cost in setting it up.

For this example, we would use CodePlex repository, but the method can be used with any on-premise TFS repository or even with Visual Studio Online

Downloading the latest version

A direct link to Windows Version of Jenkins is available here.  Installation of this will require administrative rights if you are doing it on Windows 7+, or Windows Server 2008+

Once the installation has been completed, you will have a service running in the Service Manager



If this service is running, you can access Jenkins console at:  http://localhost:8080/

Download TFS Plugin

Visit the Manage Plugin Page [Manage Jenkins > Manage Plugins > Available ] (shortcut) and search for Team Foundation Server plugin.  Click on the checkbox and press the button ‘Install without restart’


If your build machine/server has restricted access to the Internet, you will get an error downloading the file Failed to download from
    at hudson.model.UpdateCenter$
    at hudson.model.UpdateCenter$DownloadJob._run(
    at hudson.model.UpdateCenter$InstallationJob._run(
    at hudson.model.UpdateCenter$
    at java.util.concurrent.Executors$ Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at Source)
    at hudson.remoting.AtmostOneThreadExecutor$
    at Source)

In such cases, you need to download latest version of the plugin manually and copy it to



You will need to restart Jenkins service if you had to install it manually.

Downloading Team Explorer Everywhere

If you are running this process on your desktop machine and you are a .NET developer, chances are that you would have Visual Studio 2012+ installed.  In such cases, you will have Team Foundation executables on your machine and also the path of TF executables will be mentioned in PATH system variable as well.

When TF executable path is not part of PATH system variable, you will have to configure Jenkins to look into the right directory (shortcut).  On my home laptop, I’ve configured it as,


If you are running this on your Windows Server which has only .NET framework installed, you will have to install TEE.  If you are running this on a Unix/Linux server, you will still need TEE.  This is a free executable from Microsoft and is very thin-client.  You can download and install it from here and setup the configuration as


You would need to run tf eula on Command Prompt to accept the Agreement of Use and Terms and Conditions and press ‘y’ when it prompts.  Similar configuration needs to be done for Unix / Linux.  The same CMD file will work for Unix and Linux platforms.

Setting up TFS repository in Jenkins

Click on the New Job link on the left menu to create a new Build Profile (shortcut)


On the next screen, you can customize the configuration to enable concurrent builds, retry count, etc. But for this article, the focus would be to configure TFS workspace.  So to get the TFS configuration, visit your CodePlex framework page and get the TFS URL.  If you are configuring for a repository other than CodePlex, you can check the URL with your administrator


Copy the link to Jenkins as shown below and click on Apply


Now you can trigger Build for environment and it should build successfully. 

You can use this method with any TFS repository – On-premise as well as Visual Studio Online.  One thing worth noting here is – every TFS repository (here has multiple collections (TFS01…. TFSxx) and each collection has projects.  The Server URL should include the name of the collection, whereas the Project path should be a relative path ($/…) to the actual project.  

Using CodePlex SVN Path with Jenkins

You can use SVN link to access the Codeplex repository as well.  Please note that if you are using a non-Codeplex repository, you may not have a SVN URL.


So you can opt for any method if you are using Jenkins for CodePlex and can setup Build Automation and Continuous Integration as well.

Hope this helps.

[Solved] TF400012: Full-text search failed

March 19, 2014 ALM, TFS, Visual Studio , , ,


TF400012: Full-text search failed. Contact your Team Foundation Server administrator or try the operation again.
(Code 30046: SQL Server encountered error 0x8007042d while communicating with full-text filter daemon

Root Cause

SQL Full-text Filter Daemon Launcher may have shutdown


This error occurs only when the Daemon service is down.  TFS and its SharePoint site uses Microsoft SQL database for storing code.


Please note that the actions below have to be performed on the Data Tier of your TFS architecture.  Your data tier may reside on a data-farm if your TFS has multiple deployments.  Also if your TFS tiers are behind the organization firewall, you may be restricted in performing these actions.

To enable full text search, you can enable/configure SQL Full-text Filter Daemon Launcher (instance name) using following steps –

  • On the Start menu, point to All Programs, point to Microsoft SQL Server, point to Configuration Tools, and then click SQL Server Configuration Manager

  • In SQL Server Configuration Manager, click SQL Server Services, right-click SQL Full-text Filter Daemon Launcher (instance name), and then click Properties

  • Click the Log On tab of the dialog box, and then select or enter the account under which to run each process created by the SQL Full-text Filter Daemon Launcher service. If you choose not to use the Local Service account, then we recommend that you specify a low-privileged local user account with User rights and permissions on the local computer.

  • After you close the dialog box, click Restart to restart the SQL Full-text Filter Daemon Launcher service.
Follow on Feedly