DiscountASP.NET

TFS Process Template Upgrade TF51515 Error

Team Foundation Server 2012 Journal Entry: Day 43:

Deploying Team Foundation Server 2012 in our hosting environment at our North American and European data centers has been successful. All services have been stable and I’m seeing a decent rate of new customers that are early adopters.

I have performed several free migrations for our existing Team Foundation Server 2010 customers to the new environment. Everything has been working well, but a handful of users have been reporting a problem.

While the Team Project Collection and associated Team Projects and data have moved over, using the Configure Features wizard results in an error: “TF51515: The constant ID for InsertConstantSet is missing.”

Scouring the error code produced no useful information and I enlisted the help of the Microsoft Visual Studio Team Foundation Server 2012 team. It had been several weeks since I had first contacted them but I’m happy to have found a workaround.

The information that I had gathered was: In some cases, if a Team Project contains a custom Team Project Group, the Configure Features wizard (feature enablement) that upgrades a previous Process Template to an updated version shipped with Team Foundation Server 2012 that allows the use of new features, it will fail and throw the TF51515 error.

Having performed a serious evaluation, I have discovered that there are certain requirements that must be met in advance:

If the requirements are met, the following steps need to be performed:

  1. Make sure that no team members are actively making changes.
  2. Create a backup (If you are a TFS 2012 hosting customer, please contact our technical support team and we can create an in-place backup on your behalf).
  3. Obtain the unmodified Work Item Templates. Download: TFS2012TypeDefinitions.zip.
  4. Extract the contents of the TFS2012TypeDefinitions.zip file and note the location.
  5. For good measure, delete the cache directory at: C:\Users\WindowsUser\AppData\Local\Microsoft\Team Foundation.
  6. Before going any further, just note that you’ll have to repeat the steps below for each Team Project that is failing to upgrade. Just work with the first Team Project that you’re having problems with.
  7. Access the witadmin command-line tool:
    • Visual Studio 2012: Open Developer Command Prompt for VS2012
    • Team Explorer (x86): Open a Command Prompt window with elevated privileges and change directories to: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>
    • Team Explorer (x64): Open a Command Prompt window with elevated privileges and change directories to: C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE>
  8. Execute the following command to get a full list of Work Item Templates for your Team Project: witadmin listwitd /collection:https://TfsServer.discountasp.net:443/tfs/YourTeamProjectCollection /p:”YourTeamProject”
    I would highly recommend saving the list to a separate text document.
  9. Even though a backup is available, as an extra precaution, create a backup of each existing Work Item Template. To download the Work Item Template, execute the following command for each Work Item Template: witadmin exportwitd /collection:https://TfsServer.discountasp.net:443/tfs/YourTeamProjectCollection /p:”YourTeamProject” /n:”WorkItemTemplate” /f:”C:\path\WorkItemTemplate.xml.bak”
  10. Execute the following commands:
    • Task Work Item Template: witadmin importwitd /collection:https://TfsServer.discountasp.net/tfs/YourTeamProjectCollection /p:”YourTeamProject” /f:”ExtractedZipFilePath\ProcessTemplate\task.xml”
    • Code Review Request: witadmin importwitd /collection:https://TfsServer.discountasp.net/tfs/YourTeamProjectCollection /p:”YourTeamProject” /f:”ExtractedZipFilePath\ProcessTemplate\CodeReviewRequest.xml”
    • Code Review Response: witadmin importwitd /collection:https://TfsServer.discountasp.net/tfs/YourTeamProjectCollection /p:”YourTeamProject” /f:”ExtractedZipFilePath\ProcessTemplate\CodeReviewResponse.xml”
    • Feedback Request: witadmin importwitd /collection:https://TfsServer.discountasp.net/tfs/YourTeamProjectCollection /p:”YourTeamProject” /f:”ExtractedZipFilePath\ProcessTemplate\FeedbackRequest.xml”
    • Feedback Response: witadmin importwitd /collection:https://TfsServer.discountasp.net/tfs/YourTeamProjectCollection /p:”YourTeamProject” /f:”ExtractedZipFilePath\ProcessTemplate\FeedbackResponse.xml”
  11. Use Internet Explorer to access the Team Project Collection Overview page at: https://TfsServer.discountasp.net:443/tfs/YourTeamProjectCollection/_admin, select the Team Project and then click Configure Features.
  12. Go through the steps in the wizard and your older Process Template should update.

I have been informed that the problem is a bug and Microsoft will issue a formal fix in the first quarter of 2013.

Thanks to Bogdan Spaiuc and Aaron Hallberg over at Microsoft for giving us a hand with this issue.

Exit mobile version