Windows SharePoint Services [Team Foundation Server]

The Windows SharePoint Services plug-in defines the project portal for the team, based on a SharePoint site template. The plug-in name is Microsoft.ProjectCreationWizard.Portal. The Windows SharePoint Services XML file is named WssTasks.xml and is located in the Windows SharePoint Services folder in the process template folder hierarchy. You can change the XML file and folder name if necessary.

In the XML file, specify one or more tasks and their dependencies. There are three key tasks to specify: which site template to use, which document libraries to create, and which folders and files to copy into the document libraries. For an example of tasks specifying a simple project portal, see the WssTasks.xml file in the MSF for Agile Software Development process template.

Note

Team Foundation Server does not include a mechanism for the deployment of client-side plug-ins, policies, or other modifications. If you want to deploy plug-ins, policies, or other modifications to Team Explorer, you must use your own distribution and installation program.

For more information about Windows SharePoint Services sites and Windows SharePoint Services administration, see the Windows SharePoint Services Administrator's Guide.

Site Template

You must specify a site template that the project portal is based on. The site template also must be available on the Team Foundation Server SharePoint Portal. Site templates are not included in the process template.

Specify the site template using the site element.

<site template="" language=""/>

The following table describes the attributes for the site element.

Attribute Description

template

Specifies which template to use. The template is a combination of the template name and configuration id from the webtemp.xml file on the SharePoint server.

language

Specifies a locale id to indicate which language version of the site template to use. The English version is 1033.

The following example shows how to reference the English version of template VSTS_MSFAgile.

  <task id="SharePointPortal"
        name="Create Sharepoint Portal"
        plugin="Microsoft.ProjectCreationWizard.Portal"
        completionMessage="Project site created.">
    <dependencies/>
    <taskXml>
      <Portal>
        <site template="VSTS_MSFAgile" language="1033"/> 
...

Note

All other Windows SharePoint Services tasks depend on this task because the project portal must be created before you create additional document libraries or copy files.

Creating Custom Site Templates

You can create custom SharePoint site templates for use with process templates. SharePoint site templates are created by using the administrative features on the SharePoint site. For more information about how to create SharePoint site templates, see the Microsoft Windows SharePoint Services 2.0 Help.

After you create a custom SharePoint site template, you must add it to any Team Foundation Server where it will be used. First save the custom site template to a .stp file. For more information about saving site templates, see the Microsoft Windows SharePoint Services 2.0 Help.

You can use the SharePoint site to add custom site templates, or you can use the command prompt. The following procedure explains how to add a custom site template to Team Foundation Server.

To add a custom site template to Team Foundation Server

  1. On the Team Foundation Server, open a command prompt window.

  2. At the command prompt, change to the \Program Files\Common Files\Microsoft Shared\web server extensions\60\bin directory.

  3. Type the following command to add the custom site template to Team Foundation Server.

    stsadm -o addtemplate -filename <custom site template filename>.stp -title <site template title>

  4. Type iisreset and press ENTER. IIS must be restarted so that the added site template is available.

After the custom site templates have been uploaded to Team Foundation Server, process templates can use them to create team projects. The following procedure explains how to modify the process template XML to use a custom site template.

To add a custom site template to a process template

  1. On the Team Foundation Server, open a command prompt window.

  2. At the command prompt, change to the \Program Files\Common Files\Microsoft Shared\web server extensions\60\bin directory.

  3. Type stsadm -o enumtemplates and press ENTER. The available site templates are listed. This information is needed to construct the appropriate process template XML.

    For example, if you added a site template named ExCustom you would see the following output.

    ExCustom - Language: 1033 - Site Template: _GLOBAL_#1 - Template Id: 1

    Note

    The Template Id may be different depending on how many site templates are on the server.

  4. In Visual Studio, on the Team menu, point to Team Foundation Server Settings, and then click Process Template Manager.

  5. Download the process template that you want to modify using the Process Template Manager.

    For more information about downloading a process template, see How to: Download a Process Template.

  6. In the process template, edit WSSTasks.xml.

    Find the site element, and change the template attribute to match the site template name that you retrieved in step 3. The following XML shows an example of the site element for the ExCustom example template.

    <site template="_GLOBAL_#1" language="1033"/>
    
  7. Upload the updated process template.

    For more information about uploading a process template, see How to: Upload a Process Template.

    Note

    Updated process templates must not contain .exe files in any folders or project creation will fail, even though the updated process template will upload successfully.

You are now able to use the New Team Project wizard to create new team projects from the custom process template. The new team projects will use the custom site template for their project portal.

Document Libraries

After the project portal is created, you can specify that additional document libraries be created. Use the documentLibrary element to specify a document library.

<documentLibraries>
   <documentLibrary name="" description=""/>
</documentLibraries>

Note

Versioning for a document library cannot be enabled or disabled in the process template. You can enable or disable versioning via the Windows SharePoint Services site template, or after project creation.

The following table describes the attributes for the documentLibrary element.

Attribute Description

name

Specifies the name of the document library that appears on the project portal.

description

Provides a description of the document library that appears on the project portal.

The following example shows how to create a document library named Development that the development team can use to store documents.

<documentLibraries>
   <documentLibrary name="Development" 
      description=" Documents for the development team "/>
</documentLibraries>

Folders and Files

After the project portal is created, you can specify additional folders to create. You can also specify files to copy such as template files.

Use the folder element to create a new folder.

<folders>
   <folder documentLibrary="" name=""/>
</folders>

The following table describes the attributes for the folder element.

Attribute Description

documentLibrary

Identifies which document library to create the folder in.

name

Specifies the name of the folder.

The following example shows how to create a folder named Trip Reports in the Development document library where developers can store trip reports from conferences or customer visits.

<folders>
   <folder documentLibrary="Development"
           name="Trip Reports"/>
</folders>

You must also copy files into document libraries and folders. The source files are located under the Windows SharePoint Services folder. You must specify a target on the project portal.

<files>
   <file source="" documentLibrary="" target="" queryId="" /> 
</files>

The following table describes the attributes for the file element.

Attribute Description

source

A relative path to the local copy of the file. Generally, the source path name always begins with Windows SharePoint Services.

documentLibrary

The name of the document library into which the file will be copied.

target

A relative path to the target on the project portal where the file is copied.

queryId

Specifies the name of a work item query that is bound to the file. When the file is opened for the first time, it is populated with the results of running the query. This attribute is optional, and the specified query must exist in the workitems.xml file.

Note

queryId only applies to .xls and .mpp files.

The following example shows how to copy a template file named Project Checklist into the Project Management folder. This example also specifies that when the file is first open, it should be populated with the results of the Project Checklist work item query.

<files>
   <file source="Windows SharePoint Services\Templates\Project Checklist.xls" 
      documentLibrary="Project Management" 
      target="Project Checklist.xls" 
      queryId="Project Checklist" />
</files>

Note

You could include folders and files as part of the site template, and you would not have to list them in the XML.

Note

If you specify .exe files and the Windows SharePoint site does not support .exe files, you will not be able to create a team project successfully using the process template.

Process Template Performance

The files that you specify in wsstasks.xml are included as part of the process template when it is uploaded. The size of the process template affects how long it takes to create a new team project. Larger process templates take longer to create new team projects. Therefore you should consider alternate strategies to provide files when process template performance degrades.

Using the Site Template

You can include files as part of the Windows SharePoint site template. This moves files out of the process template and into the site template and improves performance when creating new team projects.

However, there is a benefit to listing files in wsstasks.xml. You can bind Microsoft Project and Microsoft Excel files to a query using the queryid attribute described previously. This assists team members when they open the files because they will already be connected to the correct Team Foundation Server and query.

Using an Alternate Web Site

If you have a large collection of files that are shared amongst multiple team projects, you can use an alternate Web site to host the files and link to the files from the project portal or Web pages. This strategy also increases performance when creating team projects since the files do not need to be copied to the project portal.

Process Guidance

Process guidance files are installed by the Windows SharePoint Services plug-in. All the process guidance files are located under the Windows SharePoint Services\Process Guidance folder, and a file element must be specified for each file to ensure it is copied to the project portal. For more information about customizing process guidance, see MSF for Agile Software Development and MSF for CMMI Process Improvement.

See Also

Tasks

How to: Verify Windows SharePoint Services Changes
How to: Download a Process Template
How to: Upload a Process Template