Creating SharePoint Portals, Reports, and Upgrading Reports for an existing team project

In the Release Candidate, we have added the ability to do the following:

  1. · Create a SharePoint portal for a team project that was created without a portal
  2. · Create a reports site for a team project that was created without reports
  3. · Update reports for a team project with the latest versions available in the RC process template.

The steps aren’t pretty, but a lot better than what they were before. We are working on a power tool to make it easier for RTM.

There are basically two steps:

  1. Create an XML file with the proper commands. (This is explained in the sections below)
  2. Do the following:
    1. Open Visual Studio.
    2. Select the Team Explorer tab so that it is visible.
    3. Go to the Command Window and run File.BatchNewTeamProject C:\File.xml
    4. You will not see output in the command window. Look for the log file to find out what happened. (See below for where the log file is located)

Here is how to construct the XML file for each scenario:

Create a SharePoint portal for an existing team project

<?xml version="1.0" encoding="utf-8"?>

<Project xmlns="ProjectCreationSettingsFileSchema.xsd">

<TFSName>TFSURL/COLLECTION</TFSName>

<LogFolder>LOGFOLDER</LogFolder>

<ProjectName>TEAMPROJECT</ProjectName>

<AddFeaturesToExistingProject>true</AddFeaturesToExistingProject>

<ProjectReportsEnabled>false</ProjectReportsEnabled>

<ProjectSiteEnabled>true</ProjectSiteEnabled>

<ProjectSiteWebApplication>SHAREPOINTWEBAPP</ProjectSiteWebApplication>

<ProjectSitePath>PORTALPATH</ProjectSitePath>

<ProjectSiteTitle>TEAMPROJECT</ProjectSiteTitle>

<ProjectSiteDescription>SITEDESCRIPTION</ProjectSiteDescription>

<ProcessTemplateName>PROCESSTEMPLATE</ProcessTemplateName>

</Project>

Substitutable fields:

Field

What it means

TFSURL

The URL to the TFS Server.

Example: “https://tfsserver:8080/tfs”

COLLECTION

The name of the collection

Example: “DefaultCollection”

LOGFOLDER

The folder to create the logfile in. The log file will be named TEAMPROJECT.log

Example: “C:\”

TEAMPROJECT

The name of the team project to create the site for

Example: “My Project”

SHAREPOINTWEBAPP

The Friendly Name (not the URL) to the SharePoint Web Application. NOTE: By default, the URL and the friendly name are the same.

Example: “TFS SharePoint”

PORTALPATH

The relative path to where you want the site to be created.

Exampe: “sites/DefaultCollection/MyProject”

SITEDESCRIPTION

The site description for the SharePoint site

Example: “The ‘My Project’ Portal Site”

PROCESSTEMPLATE

The process template that will be used to for creating the project portal

Example: “MSF for Agile Software Development v5.0 – RC”

This will create the project portal from the process template, as-if it were created at project creation time, including deploying documents, binding Excel workbooks, enabling SharePoint dashboards.

Create Reports for an existing team project

<?xml version="1.0" encoding="utf-8"?>

<Project xmlns="ProjectCreationSettingsFileSchema.xsd">

<TFSName>TFSURL/COLLECTION</TFSName>

<LogFolder>LOGFOLDER</LogFolder>

<ProjectName>TEAMPROJECT</ProjectName>

<AddFeaturesToExistingProject>true</AddFeaturesToExistingProject>

<ProjectReportsEnabled>true</ProjectReportsEnabled>

<ProjectReportsForceUpload>false</ProjectReportsForceUpload>

<ProjectSiteEnabled>false</ProjectSiteEnabled>

<ProcessTemplateName>PROCESSTEMPLATE</ProcessTemplateName>

</Project>

Substitutable fields:

Field

What it means

TFSURL

Same as above

COLLECTION

Same as above

LOGFOLDER

Same as above

TEAMPROJECT

Same as above

PROCESSTEMPLATE

Same as above

This will create the reports site from the process template, as-if it were created at project creation time.

Update Reports with latest versions

To do this, follow the same steps as the Create Reports example, except for this small change to the XML file (change “false” to “true” for ProjectReportsForceUpload):

<?xml version="1.0" encoding="utf-8"?>

<Project xmlns="ProjectCreationSettingsFileSchema.xsd">

<TFSName>TFSURL/COLLECTION</TFSName>

<LogFolder>LOGFOLDER</LogFolder>

<ProjectName>TEAMPROJECT</ProjectName>

<AddFeaturesToExistingProject>true</AddFeaturesToExistingProject>

<ProjectReportsEnabled>true</ProjectReportsEnabled>

<ProjectReportsForceUpload>true</ProjectReportsForceUpload>

<ProjectSiteEnabled>false</ProjectSiteEnabled>

<ProcessTemplateName>PROCESSTEMPLATE</ProcessTemplateName>

</Project>