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:

IterationId

ExternalLinkCount

HyperLinkCount

AttachedFileCount

AreaId

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:

TeamReview

Malevich

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

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 “SomeProject.com”.

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:

$DatabaseFilessqlserver1SomeDBNameSPsdbo.SomeSP.sql

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.

Nice.

 

Problems Upgrading VS Solutions to 2008 With CruiseControl.Net

Problem:

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

Resolution:

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.