Using Git-TFS in Visual Studio 2013 Express

Microsoft has released Visual Studio 2013 Preview, and announced the availability of Git for Visual Studio and Team Foundation Service. Today, let’s go through the new experience of version control in VS 2013 Preview.

Account Creation

Microsoft provides Team Foundation Service Free Plan for up to 5 users. I’m using the service for demo in this article. If you don’t have an in-house TFS Server, you can also take advantage of it and sign up for an account here. If you need a TFS Hosting service with good customer service, you may check out Dynamsoft TFS Hosting plans.

After creating an account with Microsoft TFS Service, you will be directed to your TFS page like the one shown below. You can see two options for creating a team project. The account URL is located below “Getting started”.

TFS main page

Team Project Creation

Click “New team project + Git” to create a team project using Git as the source control provider.

create git project

 

Specify the project name and select Git for version control.

specify new project

 

This is the page for my newly created team project. After creating the team project, we can then push the local repo to remote server.

project created

Local Project Creation

Create a new project in Visual Studio, and do not forget to check “Add to source control”.

create local project

 

Choose Git as your source control system.

choose git

 

Now you will be able to view the changes of your source code.

changes of source code

 

Commit your code.

commit changes

 

Right click a file in Team Explorer, you can compare version differences with syntax highlighting.

diff files

 

Also, checking repo history is convenient by right click.

view history

Publish to Remote Repository

Switch to Commits.

switch to Commits

 

Find Git URL on your TFS account.

git URL

 

Copy the URL to remote repository configuration, and click “Publish” to upload your local files to remote server.

publish to remote repo

 

Check commits information online.

commit log

 

Import Git from GitHub

Clone Git repo.

git clone

 

Download source code to local disk.

clone finished

 

Double-click your repo and click “Open” to mount your project.

open cloned project

 

That’s all about how to simply use Git between Visual Studio 2013 Express and Git remote server. Don’t hesitate to email kgao@dynamsoft.com if you have any idea to share with me.

 

 

How to log in TFS as a different user?

Sometimes you may want to switch to another user to log into your Team Foundation Server (TFS) service. However, you would find that Windows remembers your credentials and log you in automatically. So how to make TFS forget the old credentials so that you can get the chance to enter the user name and password of TFS again? Where is the credentials information stored?

TFS - connect to team project

Actually Windows stores the credentials information at Control panel\User Accounts\Manage Your Network Passwords (or Control Panel\User Accounts and Family Safety\Credential Manager).

For example, I’m using Dynamsoft TFS Hosting service. As we can see in the screenshot below, there is a record of credentials for auto logon to “s01.tfshosted.com” which is the TFS Server URL of my hosting account. So we can click Remove from vault to remove the automatic logon to TFS server using the current user. If you want to keep using another user for future logon, you can click Edit and update the credentials accordingly.

Windows Credential Manager

After you remove the record for TFS service logon from Windows Credentials, you will be prompted for a new set of credentials when you go into Team Explorer the next time.

Log in dialog box for TFS

Vice versa, if you find you get the prompt for entering credentials to log into TFS Service every time and want to make it automatic, you can click Add a Windows credential to let Windows remember your credentials.

Add a Windows credential for TFS logon

Let me know in the comments section below if you have any questions or comments on changing the TFS credentials.

If you are looking for a TFS hosting service, you may check out Dynamsoft TFS hosting plans and contact support@dynamsoft.com with any questions.

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.

 

How to set up a build server for your TFS Hosting account

In this article, I will share with you on how to set up a build server for your TFS Hosting account.

Assume you have already signed up for a TFS hosting account. If not, you can go to TFS Hosting Sign Up to get one. Now please follow the steps below to set up a build server for your TFS hosting account.

1. Install TFS Build Service.

Download and run Visual Studio Team Foundation Server 2010 Setup. Since Dynamsoft has already set up the server side for you, you only need to choose the “Team Foundation Build Service” option. Then Click Install to install the service.

Team Foundation Setup

2. Start Build Service Configuration and click Next.

build service welcome

3. Project Collection

Then you’ll be guided to Project Collection to configure your Team Foundation Server info. Before configuring the connections, please add “72.15.153.156 TFSServer1” to the hosts file on your build machine (under C:\Windows\System32\drivers\etc\). 72.15.153.156 is the IP address of TFS server.

Then let’s go back to Project Collection. Click Browse… to select your team project collection. Since you haven’t connected to any TFS Server before, you can click Add in the “Add/Remove Team Foundation Server” dialog box to add a new one.

Name or URL of Team Foundation Server: tfsserver1
Path: tfs
Port number: 8080

After clicking OK, choose your team project collection. In this sample, we choose 105012.

4. Credential Settings

In the Run Team Foundation Build Service as section, choose “Use a user account” and enter the account name and password.

Please note that the account will be used to run the build service and connect to the Team Foundation Server, so please make sure:

a)      The account has the permission to run the build service. Usually you can choose the login user. In this case, I choose 105012_build.

b)      The same account exists on the TFS server. To double confirm this, you can log into your web portal and navigate to “TFS Hosted -> User Management”. If the user 105012_build is not there, you can click Create User to add the user. Please note that the password for the user should be the same on both machines.

c)        105012_build is in the “Project Collection Build Service Accounts” group. In Visual Studio, navigate to “Team -> Team Project Collection Settings -> Group Membership”. You can then choose “Project Collection Build Service Accounts” and click Properties to check the members. If the user is not in the list, please check out Can I add a Windows user to my TFS account for information on how to add.

For the port number, I choose the default one 9191. Please make sure it is not blocked by the firewall or any antivirus software on your build server.

5. Update Local Build Service Endpoint (incoming)

First, you need to stop the build service. To do this, you can open “Team Foundation Server Administrator Console” and click Stop in Build Configuration.

Then, click on Properties to change the value of Local Build Service Endpoint (incoming) from the machine name to your public network IP.

Note: please make sure that your firewall allows Microsoft Visual Studio Team Foundation Build Services to run both privately and publicly.

Done. Now you can get started to use your Build Server. If you have any questions or comments, please add them below or contact me at kgao@dynamsoft.com.

How to choose a better TFS hosting service?

Microsoft Visual Studio Team Foundation Server is the collaboration platform at the core of Microsoft’s application lifecycle management (ALM) solution. It automates the software delivery process and gives you the tools you need to effectively manage software development projects throughout the IT lifecycle.

Due to the high cost of setting up TFS internally and the increasing maturity of hosting services, many of these companies now include TFS hosting. Now the question pops up: how to choose a TFS hosting service that can suite the team better? I list off some factors below, and hope the information helps.

 

Good customer service adds value

During one of our weekly training events a question was asked:  When we talk with our customers, they always tell us …? One of our team members answered the question immediately with: Good Customer Service.  True.  When a lot of companies announce themselves as customer oriented, not many of them really help their customers find the right solution, either because their product/service lines are too large and/or spread out, or they’re overloaded with their customers needs … sometimes that is just reality, but it is also an excuse!

I was happy to hear my coworker’s answer. That is what we are focusing on – Good Customer Experiences. I’m also very proud to show you our Customer page, which includes our existing customers as well as their feedback on our services.

 

Whether your data is in good hands

Before you make the decision, it’s critical to learn the security features provided by the vendor:

  1. Details of the data center, including its location and the service level.
  2. Database backup plans as well as the frequency.
  3. Whether you can download the database from the vendor (anytime).
Company Data Center Database Backup Database Downloadable Price
Dynamsoft VancouverSAS70 and CICA5970 certified Onsite: every 15 minutesOffsite: daily One per month at no cost From $20 /user/month
DiscountASP.NET US / UK Daily One per month at no cost;Need to pay for each additional backup. From $20 /user/month
Phase 2 International Hawaii 5 days’ worth of full backup One per month From $ 129.99 /user/month
PRAKTIK Hosting Seattle, WA USASAS 70 Certified From $25 /user/month
SaaS Made Easy, LLC IndianaSAS 70 Type II compliant UPS & power backup From $15.00 /user/month
TeamDevCentral Nightly backups $500.00 ~ $12,000.00 (CAD) setup fee + $150.00 ~ $200.00 (CAD) /user/month
TFS Server Hosting $25 /user/month

 

To learn more about these corporations and their services, please go to: TFS Hosting Service Providers

 

Database migration from VSS

If you were using Visual SourceSafe, it’s ideal and necessary to migrate all your VSS data to the new system. Both Dynamsoft and DiscountASP.NET provide FREE database migration for customers.

 

Available add-ons

In cooperation with Pyxis, most TFS hosting companies provide the Urban Turtle add-on to prioritize your backlog, plan your work and deliver software. Currently, Microsoft doesn’t provide the add-on for TFS Azure.

 

Learn the company history

Dynamsoft has 8 years of experience in developing source control and bug tracking software. Thus, our team has better understanding of version control and bug tracking, which helps in providing better services to our customers. July 04, 2010 was the fifth anniversary of the launch of SourceAnywhere Hosted, Dynamsoft’s first SaaS solution for source control. Over the past few years, the online rate of our server has been (and continues to be) as high as 99.9x%. Learn More >>

DiscountASP.NET is focused on hosting .net software, including TFS, SQL Server, etc. Learn More>>

PRAKTIK Hosting as well as some other companies specializes in TFS hosting.

It’s a big decision to start using a new system and service. If you have any other suggestions for other users, please feel free to share your comments below. You can also email me at kgao@dynamsoft.com.

How to Manage TFS Permissions

TFS has two types of permission management: Membership Management and Security Management.

Membership Management: It defines the relationship between different users and groups. Security Management: It manages the permissions for users and groups.

The above two management can be performed on three levels: Server Level, Collection Level and Project Level.

Server Level

You can configure the permissions like creating and deleting collections on the server level. The server level permission management can be configured through the TFS Administration Console. To do that, you can open the console, click Application Tier, and click Group Membership/Administer Security in the Application Tier Summary section.

Collection Level

You can configure the permissions, such as, creating/deleting projects and manage process template on the collection level, either by using the TFS Administration Console or TeamExplore. If you’d like to do it through the console, you can navigate to “server -> Application Tier -> Team Project Collections -><select the collection> -> Group Membership/ Administer Security in the General tab”. For TeamExplore, you can go to “Menu Team-> Team Project Collection Settings-> Group Membership/Security”.

Project Level

Usually, we can use TeamExplore to manage the permissions (such as manage test) on the project level. To do that, go to “Menu Team-> Team Project Collection Settings-> Group Membership/Security”.

After clicking Group Membership, you can do the following operations through the popup dialog box:

TFS Group Membership

  1. Create a new team foundation server group: After clicking New, you can enter the group name and description, and then click OK.
  2. Remove a group: Select the target group, and then click Remove. Afterwards, choose Yes on the Confirm page.
  3. Add Windows user or group: Select the target group, click on “Properties”. Then go to the “Add member” section and choose “Windows User or Group”. After clicking “Add”, you’ll be asked to enter the Windows user or group name. Note: Please make sure the same Windows user or group has been created on the machine hosting TFS Server. In addition, if you are using TeamExplore to do the operation, the Windows user or group should be available on the operated machine.For users of Dynamsoft TFS Hosted, you can log into your web portal and then go to “TFS Hosted -> User Management” to create the Windows user(s) on TFS Server. Currently, you are not allowed to add windows group.
  1. Add team foundation server group to another group: Select the target group, click on “Properties”. Then go to the “Add member” section and choose “Team Foundation Server Group”. Follow the prompts to finish the operation.
  2. Remove members from a group: Select the target group, click on “Properties”. In the Members tab, choose the users/groups and then click Remove and remove the members from the group.Note: Default groups of Server/Collection Level and Project Administrators cannot be deleted. And you are not allowed to modify members in Project Collection Valid Users and Team Foundation Valid Users.

After the management of Group Membership, you can configure group permissions through Security Management. After clicking Security, you can do the following operations through the popup dialog box:

TFS Group Permissions

  1. Add Windows user or group directly to the current permission level: In the Project Security dialog box, Choose “Windows User or Group” in the “Add users and groups” section. Then click “Add” to add the Windows user/group.
  2. Add group(s) to the current permission level: Choose “Team Foundation Server Group” in the “Add users and groups” section and then click “Add”.
  3. Remove members from the current permission level: In the “Users and Groups” section, select the target group or user and then click “Remove”.
  4. Manage Permissions for items: Select the item you want to edit in the “Users and Groups” section. You can then view and edit the permissions for this user or group in the “Permissions for [item]” section. Check “Allow” to grant authorization for user/group to do the operation. If Demy is checked, the user/group can’t do the corresponding operation, even when the user/group is in another group granted the same permission (except for Team Foundation Administrators, Project Collection Administrators and Project Administrators).

If neither “Allow” nor “Deny” is checked, the user/group doesn’t have the permission to do the corresponding operation, unless the permission is granted to another group containing the saying user/group.

Note: Permissions for Project Collection Administrators and Project Administrators are not editable.

For Dynamsoft TFS Hosted, you are not allowed to change the Memberships and Security on the server level. You can create users and add/remove users to/from the groups (see below) through web portal:

Project Collection Administrators
[Project]\ Readers
[Project]\ Project Administrators
[Project]\ Contributors
Groups created by yourself

Manage Version Control Permissions: Version control permissions are specific to source code files and projects/folders. To set the permissions, you can follow the steps below:

  1. Connect to your team project.
  2. Open Source Control Explorer (View -> Other Windows -> Source Control Explorer).
  3. Right-click the file or folder, and then click Properties -> Security.

Manage Build-Level Permissions: After opening the project in Team Explorer, you can right-click Builds and then click Security to manage the securities.

How to Customize the Process Template

TFS2010 provides two types of Process Template by default: MSF for Agile Software Development and MSF for CMMI Process Improvement. The former is mainly for agile processes while the latter is for teams have a formal process for change management.

To take care of different users with different usage behaviors, these two templates were designed and developed in a general way. When using the templates, you may need to add/delete work items, customize the SharePoint services and so on to better fulfill your requirements.

The Process Template Customization feature provided in TFS helps you solve the above problem. You can choose one of the following ways to do the customization.

  • Manually modify the definition file of the process template.

The files are in XML. Unless you are familiar with XML and know the structure of Process Template very well, it’s not recommended to use this way to modify the template.

  • Use “Process Template Editor Tool”. (recommended)

The editor tool comes with Integrated in Microsoft Team Foundation Server 2010 Power Tools (TFPT), and it provides the user interface (UI) to visualize the modification and help update the definition file of the process template. Here are the detailed steps:

  1. Download and install TFPT. Here is the download link:
    Microsoft Team Foundation Server 2010 Power Tools
    (.msi)
  2. Download a basic version of Process template.Open Visual Studio 2010 and connect to your TFS Server. Navigate to “Team -> Team Project Collection Settings -> Process Template Manager” (or right-click the server in the Team Explorer, and then go to “Team Project Collection Settings -> Process Template Manager”).
    TFS Process Template Manager Navigation
    In the popup Process Template Manager Window, select a template (for instance MSF for Agile Software Development v5.0). Then click “Download” to get the template to your local folder.
    TFS Process Template Manager
  3. Open the downloaded process template in Process Editor.Go to “Tools -> Process Editor -> Process Templates -> Open Process Template”. Browse and open the downloaded template (Process Template.xml). Now you can see the content of the definition file.
    TFS Process Template Navigation
  4. Modify the process template.For instance, if you want to take advantage of Work Item to manage your product requirements, you can create a new Work Item to take care of the process. To add a new work item, you can simply go to “Methodology -> Work Item Tracking -> Type Definitions”, and click on the “New” button.
    TFS Modify Process Template
    Suggestion:
    All the permission settings inherit from “Groups and Permissions” by default. If you have a huge project with large teams, it’s better to configure the permissions at “Groups and Permissions” first. This will simplify the whole modification process a lot.
  5. Save and upload the modified process template.Save the changes you made at step 4. Then open the Process Template Manager window (“Team -> Team Project Collection Settings -> Process Template Manager”). In the dialog box, click “Upload” and choose the root folder of the Process Template which contains ProcessTemplate.xml. You can then follow the prompts to finish the whole upload process.
    TFS upload process template

Done. Now you can create a team project to try out the new process template.

Dynamsoft Team Foundation Server hosting

Dynamsoft launched Team Foundation Server hosting service on Dec 13.

Sign Up Today to Get 1-Month Free Trial

Here at Dynamsoft, our mission is to ease a little burden from busy developers’ shoulders. After building SourceAnywhere (version control) and SCM Anywhere (combined version control and bug tracking), we offered SaaS (Software as a service) editions in response to customers’ request.

Over the past 4 years, our expertise in hosting service grew steadily with our client base and gained great trust. Many customers who trust our hosting service  enquired if we can provide them with TFS hosting service. At Dynamsoft, we value the voices and needs of our valued customers and that’s why we launched TFS hosting.

There have been a number of TFS SaaS providers on the field. We are committed to offering the Most Professional TFS Hosting service. Why choosing Dynamsoft?

  • 8 Years of experience in DEVELOPING source control and software configuration management solutions. Customers include IBM, HP, GE, 3M, Intel, Olympus, Samsung, and many more.
  • 4 Years of experience in HOSTING source control and bug tracking software; online rate 99.9x%
  • 8 Years of being a Microsoft Gold Certified Partner and in close collaboration with Microsoft.
  • Award-winning tech support
  • Thorough data backup: onsite every 10 minutes and offsite per day

How to Store Credentials for Automatic TFS Login

On Windows 7, you can enable TFS automatic login by adding in a windows credential in Control Panel -> User Accounts -> Manage your credentials.

manage your windows credentials

In the Credential Manager window, under the Windows Credentials section, click the “Add a Windows Credential” link to add one for your tfs server.

add windows credentials
If your TFS Server is in another domain, you might also have to add the server to your local intranet in your internet settings. In IE, Tools->Internet Options->Security tab, click on the “Local Intranet” icon, and then the Site -> Advanced button

Now you have stopped TFS prompting for passwords all the time.

On Windows XP, you can find the credentials option in Control Panel -> User Accounts -> Advanced -> Manage Passwords