How to access Team Foundation Server Source Control from Windows Explorer?

Most of the time I use TFS source control within Visual Studio. However, sometimes I just want to add or edit some files from within Windows Explorer without bothering to launch Visual Studio. If you have such needs as well, you can follow the steps below to achieve it.

Firstly, download and install Team Foundation Server Power Tools, which includes Windows Shell Extensions. It provides integration with Windows Explorer which enables you to perform most operations with TFS via Windows Explorer.

After the installation, if you right-click an item in a TFS workspace, you will see the Team Foundation Server context menu.

TFS Context Menu in Windows Explorer

When you click a source control command, you will get the prompt to log into TFS Server. I am using Dynamsoft TFS Hosting service.

Log into TFS Server

Here I add a new htm file and check in the change to TFS from Windows Explorer.

TFS Check In

Then if we go to Source Control Explorer in Visual Studio and check the history of the project , we can see the changeset I submitted from Windows Explorer.

View history of the project

How to auto-deploy web application with TFS Build Server

Provided as part of Visual Studio Team Foundation Server, Team Foundation Build enables developers/managers to manage the projects, from version controlling the source code, running associated unit tests, to releasing builds and publishing build reports. In this article, I’ll share with you on how to take advantage of TFS Build to auto deploy a web application to your web server.

TFS Web Deploy

1. Install Visual Studio 2010. In this article, we take Visual Studio 2010 for example.

2. Install TFS Build Server.
You can set up a local build server by yourself. If you are using the TFS Hosting service provided by Dynamsoft, you can ask to install the Build Server add-on for your account.

3. Install Web Deployment Tool on your TFS Build Server.

4. Install Web Deployment Tool on your Web Server and set up the site for your web application.
Note: Please change the .NET Framework Version of the site’s application pool to v4.0 in IIS and make sure the firewall or any antivirus software doesn’t block port 8172.

5. Add the following arguments to the “MSBuild Arguments” of your build definition. Separate them using space.

TFS Build Arguments

/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:MSDeployServiceURL=https://<server name>:8172/msdeploy.axd
/p:DeployIISAppPath=”TestSiteForDeploy”
/p:CreatePackageOnPublish=True
/p:MsDeployPublishMethod=WMSVC
/p:AllowUntrustedCertificate=True
/p:UserName=***
/p:Password=*****

To edit a build definition, you must have the Edit Build Definition permission. To set the permission, you can choose the target project in Team Explorer, and right-click Builds -> Security. In the Security dialog box, choose the user or group you want to grant the permission to, for instance, [DWT]\Builders. And then confirm the Edit build definition option is set to Allow.

TFS Build Security

With the above settings, the build result will be deployed to your web server automatically when you perform Queue New Build (Team Explorer -> right-click Builds -> Queue New Build).

It’s just a quick review of auto-deployment. Hope the information helps you enable the feature smoothly. If you have any comments, please don’t hesitate to leave them below for discussion. You can also reach me at kgao@dynamsoft.com.