Posted tagged ‘TFS’

Move from GitHub to TFS Git Repository

May 13, 2013

I really like Git and GitHub, but I love TFS.  Now that TFS has a Git repository I wanted to make the move back over to TFS.  Here are the steps to move from probably any Git Repo to TFS Git.

  1. Create a Git Repository in TFS
  2. Set your Alternate Credentials in TFS. TFSAlternateCredentials
    Click on Code
    Select Clone from Right
    Click Profile
    Set User Name and Password to be used later
  3. Open Git Command window such as Git Bash
  4. Move to a directory that you want to clone your code to for the transfer.
  5. Clone your GitHub repo locally.

    git clone

  6. Rename the GitHub remote repo to upstream

    git remote rename origin upstream

  7. Set the TFS Git remote repo as the origin

    git remote add origin

  8. Push your changes to TFS Git

    git push origin master

At this point you should be able to see your commit history in TFS Git repository.  Beautiful right?  I haven’t tried it yet, but I believe you can keep your original GitHub repo if you want and pull in changes with the following commands.

  1. Pull from upstream which is your GitHub repo.

    git pull upstream master

  2. Push the changes to origin which is TFS Git.

    git push origin master

Let me know if it works out for you.



Error linking Azure with Team Foundation Service

July 10, 2012

In trying to link Azure with Team Foundation Service I ran into the permission error listed below.

Failed to link TFS project ‘Your Project’ with your cloud service ‘Your Cloud Service’
Access Denied: needs the following permission(s) on the resource StrongBox to perform this action: Create a StrongBox Drawer.

You need to be added to the Project Collection Admin groups.


  1. From the main TFS page
  2. Click the Administer Account icon in the upper right corner.
  3. Select the Collection that your Team Project is in (i.e. DefaultCollection)
  4. Click “Manage collection security group and group membership”
  5. Add user from the members tab of “Project Collection Administrators”

TFS Build Agent On x64 Machine

June 18, 2012

We recently moved our build agents over to x64 machines and bumped into a few issues.  Here are the issue and solutions to hopefully help you out:

Error:  TF215097: An error occurred while initializing a build for build definition \…: Cannot create unknown type ‘{clr-namespace: …}’

This one doesn’t have to do with x64.  We use custom tasks in our build process and with setting up a new build controller you  have to specify where the assemblies for the custom tasks live.

To fix:

  1. Go To Manage Build Controllers (Team Explorer –> Right click on Builds)
  2. Select Properties for your Controller
  3. Specify “Version control path to custom assemblies”

Building .NET Application

Building Visual C++ Application

Error: Could not load the Visual C++ component “VCBuild.exe”. To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.

One of our applications is a C++ app build in Visual Studio 2005 and MSBuild would throw this error.

To fix:

  1. Ensure that you have VCBuild.exe on your machine in the paths below.  On my machine it was at the two paths below.  I already had .NET 2.0 and Visual Studio 2005 installed and it still did not work.
  2. Add these to system path variable
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcpackages
    C:\Program Files\Microsoft Visual Studio 8\VC\vcpackages
  3. Reboot (It didn’t work until I rebooted.  It might be possible that just restarting the TFS Build service would work.)

Error: Component ‘mscomctl.ocx or one of its dependencies not correctly registered: a file is missing or invalid

To fix:

  1. Find mscomctl.ocx on another machine or download from web
  2. Copy file into c:\Windows\SysWOW64

I didn’t need to register it but others say to register it.

Error: Component ‘comdlg32.ocx’ or one of its dependencies not correctly registered: a file is missing or invalid

To fix:

  1. Find comdlg32.ocx on another machine or download from web
  2. Copy file into c:\Windows\SysWOW64

I didn’t need to register it.


  1. Virus Scan: Be sure to exclude the directory on the build server where the files get dropped from Virus Scan software.  We saw a two minute gain from 8 minutes to 6 minutes doing this.

Issues when Visual Studio 2008 SP1 is installed on Team Foundation Server 2008.

August 15, 2008

We are running TFS 2008 and installed the recent service pack for Visual Studio (Visual Studio 2008 SP1) on the same server that TFS is running.  At first everything was fine, actually we went an entire day without any trouble.  However, when we arrived at work the next morning, we found TFS was logging a bunch of errors.

From Team Explorer we were receiving the following error:

  • TF30331: Team Explorer could not connect to Team Foundation server…TF30059: Fatal error while initializing web service.

The event log was filled with the following errors:

  • TF53010: The following error has occurred in a Team Foundation component or extension:
  • TF53013: A crash report is being prepared for Microsoft. The following information is included in that report:
  • The Team Foundation warehouse service was unable to initialize Web Request
    Details Url: http://localhost:8080/Warehouse/v1.0/warehousecontroller.asmx

Initially we found this post (Error installing SP1 – TFS Left in Broken State) and wasted time trying to figure out if stopping the web sites would help us like it helped the posters.  Then we tried repairing TFS through add/remove programs.  This was looking promising until about 95% of the way through when we encountered “Error 28002” in a dialog box.  The event log error for this was:

TF213000: A required user account could not be added during installation or repair of Team Foundation Server.  The installation or repair failed with the following exception message: blah blah.

Finally broke down and called Microsoft for my first time ever.  The whole team was down so it had to be done.

This apparently is a recently known issue and they just posted a KB article on the day before.  I sure wish that would have shown up in search.  Anyway the resolution was to install the service pack for Team Foundation Server (Team Foundation Server 2008 SP1).  Amazingly it worked beautifully.  It didn’t need a reboot, didn’t need to restart IIS, nothing it just worked.  Sweet!  We did reboot the server anyway to make sure that two days from now we wouldn’t run into something else.

Microsoft KB Article – TFS 2008/ Not able to connect to TFS 2008 after installing Visual Studio 2008 SP1

Hope this saved you some time,