Recreate or Create Default Reports TFS

Another product that I’ve been working with lately is TFS.  In the environment that I’ve worked with Reporting and SQL Analysis Services were added later after the environment was setup. This was fine for the actual setup but I noticed that folders and reports were not populated for our different project folders. I found that it would take a lot of time create the folders and update the default reports.  I also had to determine the type for each project.  An easier method for this is to use the commands blow.

1. Create a blank XML file and copy the information below into it. It is easier to keep the path and name short as you’ll need to reference it. You’ll want to use the chart below the screenshot to explain all the field placeholders.

<?xml version="1.0" encoding="utf-8"?> 
<Project xmlns="ProjectCreationSettingsFileSchema.xsd"> 
<TFSName>CollectionURI</TFSName> 
<LogFolder>LogFolderName</LogFolder> 
<ProjectName>TeamProjectName</ProjectName> 
<AddFeaturesToExistingProject>true</AddFeaturesToExistingProject> 
<ProjectReportsEnabled>true</ProjectReportsEnabled> 
<ProjectReportsForceUpload>false</ProjectReportsForceUpload> 
<ProjectSiteEnabled>false</ProjectSiteEnabled> 
<ProcessTemplateName>ProcessTemplate</ProcessTemplateName>
</Project>

XML Tag

Parameter

Description

TFSName

CollectionURI

The uniform resource identifier (URI) of the team project collection. The format for the URI is as follows: http://ServerName:Port/VirtualDirectoryName/CollectionName

If no virtual directory is used, the format for the URI is as follows:

http://ServerName:Port/CollectionName

LogFolder

LogFolderName

The location of the folder where you want the log file to be written. The log file that will be created is named TEAMPROJECT.log, and it will contain the events from running the batch file command. For example, you can specify “C:\” for the log folder name. If you leave the value for the folder location blank, the log file will be written to %temp% and will be named following the naming conventions for logs that the New Project Creation Wizard generates. You can locate the log file by navigating to the following directory: $:\Documents and Settings\user name\Local Settings\Temp\VSTS_TeamProjectCreation_yyyy_mm_dd_hh_mm_ss.log.

ProjectName

TeamProjectName

The name of the upgraded team project to be provisioned. You must specify the name of a team project that is defined in the project collection that you specified in the CollectionURI parameter.

AddFeaturesToExistingProject

true | false

Specify true to indicate that you are adding features to an existing team project and false to indicate that you are creating a team project.

ProjectReportsEnabled

true | false

Specify true to provision a report site and false to exclude provisioning a report site.

ProjectReportsForceUpload

true | false

Specify true to cause reports in the process template to be uploaded to the report site and falseto exclude the upload of reports.

ProjectSiteEnabled

true | false

Specify true to enable the team project portal site and false to maintain the site as disabled for the team project.

ProjectSiteWebApplication

SharePointWebApp

Specifies the friendly name (not the URL) to the SharePoint Web application (for example, Team Project Portal). By default, the URL and the friendly name are the same.

ProjectSitePath

PortalSitePath

The relative site path where you want the project portal site to be created (for example, sites/DefaultCollection/MyProject).

NoteNote
The site path that you specify must correspond to a Web site application that has been added to the team project collection where the team project is defined. For more information, see Add a SharePoint Web Application to Your Deployment.

The relative site path corresponds to the home page of the project portal.

ProjectSiteTitle

ProjectSiteTitle

(Optional) If you want a project portal name that differs from the team project name, you can type a name that is easily identified by your team members.

ProjectSiteDescription

SiteDescription

(Optional) The site description for the team project portal (for example, The “My Project” Portal Site).

ProcessTemplateName

ProcessTemplate

The name of the process template to use to create the project portal. To specify a version 5.0 MSF process template, enter one of the following values:

  • MSF for Agile Software Development v5.0

  • MSF for CMMI Process Improvement v5.0

NoteNote
If you want to use another process template, you must first make sure that it is uploaded to Team Foundation Server. For more information, see Upload a Process Template.

2. Open Visual Studio Go to View then click Team Explorer, then go to View again, select Other Windows, and then click Command Window.

3.  Type File.BatchNewTeamProject c:\”link to your file”.

4.  You should see the folder structure there is successful.  If not a log will be placed where you specified it in the XML file.

I hope this saves you some more time than it did for me!!!!

<?xml version="1.0" encoding="utf-8"?> 
<Project xmlns="ProjectCreationSettingsFileSchema.xsd"> 
<TFSName>CollectionURI</TFSName> 
<LogFolder>LogFolderName</LogFolder> 
<ProjectName>TeamProjectName</ProjectName> 
<AddFeaturesToExistingProject>true</AddFeaturesToExistingProject> 
<ProjectReportsEnabled>true</ProjectReportsEnabled> 
<ProjectReportsForceUpload>false</ProjectReportsForceUpload> 
<ProjectSiteEnabled>false</ProjectSiteEnabled> 
<ProcessTemplateName>ProcessTemplate</ProcessTemplateName>
</Project>
About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s