TF26177: The field System.RelatedLinkCount cannot be renamed

I have been trying to work with the TeamReview tool for code reviews.

Problem was, when I tried to install the Work Item templates associated with the code review items, I would get the error:

TF212018: Work item tracking schema validation error: TF26177: The field System.RelatedLinkCount cannot be renamed from 'RelatedLinkCount' to 'Related Link Count'.

So what’s a guy to do?  Turn to google of course.

After some research it becomes clear that between TFS 2008 and 2010 RelatedLinkCount was renamed “Related Link Count” and this was causing the problems.  It’s likely a result of having upgraded our TFS installation from 08 to 2010 instead of doing a fresh install.

After some work I found that I could resolve the problem by renaming the offending bit of XML in the file I was trying to import.  After changing Related Link Count to RelatedLinkCount and running the import again it gave me a few other items (1 after another) that I needed to correct:






After fixing all of these the import was successful and everything seems to be working fine.

Here is the XML file with my changes that successfully imported:

UPDATE: I somehow had uploaded the wrong file.  I believe this is actually the one I used successfully: CodeItemenCDMFixed.xml (19.02 KB)

UPDATE 2: Ok I’m stupid.  The confusion worked like this: I downloaded the 2010 version and tried to install on a 2010 server that had been upgraded from 2008.  Had problems.  Made a file to fix it.  Then later tried to install a fresh download from codeplex to a new TFS server, ran into similar problems, but really they were the reverse of what I experienced before (needed remove spaces from words vs needing to add spaces).  Turns out I had downloaded the 2008 version that time.  Totally stupid.

So, if you are trying to install to 2010 and you are getting problems like above, I think using this file will fix your issues:

Code Item en CDM.xml

if not, maybe try this one:

CodeItemenCDMFixed.xml (19.02 KB)

Update 9/25/12: Fixed the URLs to the files above.


Still Having TFS Merge Problems

I’ve tried baseless merges, forced merges, regular merges…. nothing ever “takes” (even though the changes TO get committed, TFS keeps thinking there are unresolved changes that need to be merged next time I do a merge).

Here are some screen shots of the crazy merges I’m trying with the 2 issues that never resolve.  Click for bigger picture:

UPDATE: I think we’ve resolved the problem.  There was a nonexistant file that had a mystery pending change that would never get resolved.  I undeleted it, merged this change into the file, then deleted it again, and merged that change doing a baseless merge, and it seemed to go away.

Code Review with TFS

I’ve been searching for some tools to use with TFS to help with doing code reviews.

So far the options I have found that seem worth considering are:



Code Collaborator


TeamReview looks like the option I’m going to try first.  It’s supposed to be fully integrated into the IDE, but I’m not sure how the “replay review” thing will work.  It’s supposed to highlight the same code that you hightlight during the review, which I guess can work, I’ll see how it goes.

Malevich is a web based tool that integrates into TFS, but it’s an open source project with few users, and when I see that I tend to think that it will be a major pain to get working.

Code Colaborator is something you pay per user, about 500 bucks, which is pretty darn expensive.  I’d really like to find an option that doesn’t cost several thousand dollars per year.

I’ll see how TeamReview goes and I’ll post my thoughts here.



TF30177: Team Project Creation Failed

Are you getting this error with TFS 2010?  It seems to happen to me if use a project name that includes a “.” like “”.

Drop the “.com” and it will work.

Performing a recursive wildcard delete in TFS

Because I didn’t like the options for integrating SQL Server code into TFS, I wrote an application that scripts all our database objects to text files and then checks those files into TFS every night.  If there is a change in any of the files, those changes are versioned in TFS so we can go back and see when things were changed or recover old code without restoring the entire database.

But recently there was a problem with the server that my app runs on, and during the restore process, the backup process was run twice on a set of folders (at least that is my best guess) leaving thousands of duplciate files in a myriad of folders.

So for example, if there was a file called:


then the restore process created another file called

$DatabaseFilessqlserver1SomeDBNameSPsCopy of dbo.SomeSP.sql

The problem is that my application does bulk checkins each night of all files under the DatabaseFiles folder.  I didn’t realize that the backup process had been messed up until it was too late, and those thousands of files were already checked into TFS.

So using this page to help with some of the syntax of using the TF.EXE command line too, I was able to perform a recursive wildcard delete.

In the end something like this worked just great:

tf.exe delete /recursive /noprompt "C:TFSrootDatabaseFilesCopy of*"

Notice that the wildcard is applied to all recursive folders under C:TFSrootDatabaseFiles.



Problems Upgrading VS Solutions to 2008 With CruiseControl.Net


We have a server that gets all files from TFS and uses Nant w/ Visual studio to compile our projects.  Basically nant issues a command line statement to get VS to build a given solution.

Everything was working great, until I upgraded our clients to 2008.

I went through and upgraded all our solutions.

I installed vs 2008 on the server.  But when I try to build from the command line, it tells me that the solution file “is from a previous version of this application and must be converted in order to build in this version of the application.”

I tried directly copying my solution file (skipping the source control step) directly to the server but I get the same message.

If I try to build it from the command line with VS 2005 it tells me that the solution is too new!! 

So 2005 says the solution is too new, 2008 says it is too old!

The solution on the server has the “version 9” icon, just like on my laptop.

The solution file starts with:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008


Even thought I compared the solution files and found them to be exactly the same using a diff compare tool, I allowed the server to run the “upgrade” process on the solutions.  I didn’t save any of the changes it made, but from then on it recognized those files as having been already upgraded.

I even replaced the “server upgraded” solution files with the old solution files that it didn’t like and it continued to work just fine.

There must be some other files stored somewhere that made it think that it hadn’t been upgraded yet.

This isn’t a great solution, but it works at least.


Showing Deleted Folders In TFS

Sometimes you might try to rename a folder in TFS Team Explorer and it tells you that you can’t rename the folder b/c an existing item exists (but it doesn’t).

The reason is that if there is a delete folder with the same name, it won’t allow you to name a current folder with the same name.

To see your deleted folders (so you can undelete, rename, and delete again) you can use the following option under Tools->Options.

Performing a Baseless Merge in TFS

If you create a branch in TFS, you can easily merge it back later, but if you have 2 branches or folders that you want to merge, but are not related (they weren’t branched from one another) you need to do a baseless merge.

This article describes the process:

But the short end of it is that you run the following command at the VS command prompt:

tf merge /baseless c:source c:dest /recursive

It will launch the dialog box for you to manage the merge from there.

Deleting Projects From TFS

For some reason the TFS Team Explorer UI doesn’t give you the ability to delete team projects.

To do this you need to make use of the TfsDeleteProject command line utility.

Basically just navigate to:

C:Program FilesMicrosoft Visual Studio 8Common7IDE

and run the command:

TfsDeleteProject /server:http://SERVERNAME:8080 PROJECTNAME

After you do this, you may need to run the “TfsVersionControl Administration Job” job on the machine running SQL for TFS.  It’s under SQL Agent/Jobs.

Finally, the team projects will continue to show up in Source Control Explorer.  This is because you need to do a “GET” on the projects in order for them to clean up local files.  Once you do a get on the projects they will be gone from your workspace list.