Share via


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>

Comments

  • Anonymous
    February 26, 2010
    I get this error when I try this. 2010-02-26T17:28:59 | Module: BatchTeamProjectCreator | Thread: 1 | Microsoft.TeamFoundation.Client.PcwException: TF218016: The team project could not be created because there was an error with the following SharePoint Web application: UShopfast. Either no Web application could be found with that name, or more than one Web application was found with that name. Make sure that the Web application that you chose is the one that supports projects in the team project collection. If the problem persists, either choose to create the project without a SharePoint site, or contact the administrator for collection for more details about what SharePoint Web application to use.   at Microsoft.VisualStudio.TeamFoundation.BatchTeamProjectCreator.AddWssDataToContext()   at Microsoft.VisualStudio.TeamFoundation.BatchTeamProjectCreator.InitializeContext(TfsTeamProjectCollection tfs)   at Microsoft.VisualStudio.TeamFoundation.BatchTeamProjectCreator.BatchCreateTeamProject()   at Microsoft.VisualStudio.TeamFoundation.BatchTeamProjectCreator.BatchCreateTeamProject(String teamProjectCreationSettingFile, String& logFileFullPath) 2010-02-26T17:28:59 | Module: BatchTeamProjectCreator | Thread: 1 | Team Project Batch Creation failed. Harry Yeh http://www.ushopfast.com http://www.linkedin.com/in/harryyeh http://www.twitter.com/harryyeh

  • Anonymous
    February 26, 2010
    One other thing, this was actually from an upgrade from TFS 2008 - I did have a portal for the site before but now I want to create a new one since the other one wasn't used anyways. Harry Yeh http://www.ushopfast.com http://www.linkedin.com/in/harryyeh http://www.twitter.com/harryyeh

  • Anonymous
    March 05, 2010
    You need to configure SharePoint first. Here is a help topic that will allow you to add SharePoint to an existing TFS 2010 deployment: http://msdn.microsoft.com/en-us/library/ee462861(VS.100).aspx

  • Anonymous
    May 27, 2010
    I'm getting the error that Harry was getting but I've already configured Sharepoint as you mentioned in your response. When I go into the Sharepoint Central Administration console --> Application Management --> Web Application List I have the following entries: SharePoint Central Administration v3        http;//servername:17012/ SharePoint - 80                                               http://servername/ I've tried to use "SharePoint - 80", "SharePoint-80" (in case they weren't spaces), "servername" and none have given me anything other than the error message. I can see my Sharepoint project portal at http://servername/sites/TeamProjectName so I know it is set up and working correctly.

  • Anonymous
    June 10, 2010
    Gregg's information can now also be found in the documentation at: msdn.microsoft.com/.../ff462695.aspx

  • Anonymous
    September 19, 2010
    Is a power tool available now for adding a project portal to an existing project?

  • Anonymous
    June 08, 2011
    I've had a look round but can't seem to find a power tool that does this. Any chance this process has been simplfied?