This documentation is archived and is not being maintained.

How to: Retrieve and Restore Missing Site Templates

When you use the New Team Project wizard, an error might indicate that a template is missing. This error appears when the site templates for Visual Studio Team System Team Foundation Server have not been added to SharePoint Products and Technologies. This type of problem typically occurs when you deploy SharePoint Products and Technologies on a server other than the application-tier server.

By default, you install two site templates when you install Team Foundation Server or when you install Windows SharePoint Services Extensions for Team Foundation Server. You can retrieve the missing site templates from the installation directory for Team Foundation Server.

NoteNote:

Team Foundation Server uses both process templates and site templates when you create a project. Process templates have a .zip extension (for example, MsfAgile_New.zip and MsfFormal_New.zip) and are stored in the database for Team Foundation. Site templates have an .stp extension (for example, MSFAgile.stp and MSFFormal.stp) and are stored in SharePoint Products and Technologies. When you create a project, you specify a process template, which then references the site template by name.

Required Permissions

To follow this procedure, you must be a member of the local Administrators group for the server that is hosting SharePoint Products and Technologies.

To retrieve and upload a missing site template

  1. To verify that the default site templates are missing, perform the following tasks:

    1. Log on to the server that is hosting SharePoint Products and Technologies. 

    2. Open a Command Prompt window, and change to the directory that contains the stsadm utility:

      For Windows SharePoint Services 2.0: Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\60\bin

      For Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007: Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin

      NoteNote:

      Even if you are logged on with administrative credentials, you must open an elevated Command Prompt to perform this function on a server that is running Windows Server 2008. To open an elevated Command Prompt, click Start, right-click Command Prompt, and click Run as administrator. For more information, see the Microsoft Web site.

    3. Type the following command:

      stsadm –o enumtemplates

      The command returns a list of all site templates that have been uploaded to SharePoint Products and Technologies. If VSTS_MSFAgile or VSTS_MSF_CMMI is not listed, you are missing a default site template. The site template must be present to create a project that is based on the corresponding process template.

  2. To retrieve a missing site template, perform the following tasks:

    1. Log on to the application-tier server for Team Foundation.

    2. Open Windows Explorer, and locate the missing templates in the following directory:

      Drive:\Program Files\ Microsoft Visual Studio 2008 Team Foundation Server\Tools\Templates

      Identify the appropriate file based on the version of SharePoint Products and Technologies that you are using.

      Template

      File name

      MSF for Agile Software Development

      MsfAgile.stp (for Windows SharePoint Services 2.0)

      MsfAgile30.stp (for Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007)

      MSF for CMMI Process Improvement

      MsfFormal.stp (for Windows SharePoint Services 2.0)

      MsfFormal30.stp (for Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007)

    3. Copy the file that you need to the server that is hosting SharePoint Products and Technologies. Paste the file in the same directory that you accessed in step 1b.

  3. Add the template to SharePoint Products and Technologies.

    1. On the server that is hosting SharePoint Products and Technologies, open a Command Prompt window, and change to the directory you accessed in step 1b.

    2. Type the following command, replacing FileName and TitleName for the template file and template title that you want to restore:

      stsadm -o addtemplate -filename FileName.stp -title TitleName

      For example:

      stsadm -o addtemplate -filename MsfAgile30.stp -title VSTS_MSFAgile

      or

      stsadm -o addtemplate -filename MsfFormal30.stp -title VSTS_MSF_CMMI

      Important noteImportant Note:

      You must specify the correct title for the template, either VSTS_MSFAgile or VSTS_MSF_CMMI. The process template references the site template by these specific names.

    3. Type iisreset, and then press ENTER.

      You must restart Internet Information Services (IIS) so that the added template is available.

Show: