Archive for the ‘TFS’ category

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 https://github.com/%5Busername%5D/%5Bproject%5D

  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 https://%5Baccountname%5D.visualstudio.com/DefaultCollection/_git/%5Bteamproject%5D

  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.

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

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

How:

  1. From the main TFS page http://you.tfspreview.com
  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.

Performance

  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.