Importing site template to be used by all new projects

Hi All,

I have customized a project site with announcements, templates, uploads, etc... and have saved "site as template" (site settings->administration). Is there any way to make this site template the standard template that all new projects use when being created? (This is the Project Portal Site, not the Process Guidance site).

I tried exporting the process template for the project with the site changes from the process template manager and importing as the default process... but it didn't work. The changes I made to my site were not on the newly created project's portal site.

I also saved the site template I created (.stp file) and dropped it in the Wss folder.
Then, change the site template name in the xml file (see below), but it gave me an error b/c the template name was not found and template was not on server.

Having looked at the docs in the extensibility kit, it states:

<task id="WssPortal"

name="Create project portal"

plugin="Microsoft.Pcw.Wss"

completionMessage="Project portal created.">

<dependencies/>

<taskXml>

<wss>

<site template="TFS#0" language="1033"/>

</wss>

</taskXml>

</task>

What is the correcty way to change the site template name or assign a new site template?

Are there any other ways to make a site template the standard template that all new projects use when being created?

All help is much appreciated... thanks.

[2983 byte] By [Rita] at [2008-2-25]
# 1
Hi Rita,

If you haven't done so already, first add your custom site template to the Team Foundation server where you will host the project portal. The following steps provide details on how to do this.

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.

Next, modify the process template XML using the following steps:

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 the process template, edit WSSTask.xml.

· Find the site element, and change the template attribute to match the site template name 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"/>

5. Import the updated process template.

Hope this helps,
David Chesnut MSFT

(This posting is provided "AS IS" with no warranties, and confers no rights.)

DavidChesnutMSFT at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Setup...
# 2
Hi David,

Thank you for the steps. I followed them and succesfully imported the new template.

However, now the creation of a new team project fails.

Please see error below.

I have looked at many posts, including the following, but have not found a solution yet!!!

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=15182, http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=5580, http://blogs.msdn.com/robcaron/archive/2005/04/21/410484.aspx, and others similar to it, but have not found any answers yet.

-All appropriate services on the server have been started
-I have connected to the teamfoundation server
-I have "UP"ed the IIS timeout to 5+ minutes
-I have admin rights
-I can navigate http://localhost and http://localhost/reports (although it is not the site that i imported)
-I followed all the install steps (in order) according to the install guide (singler server) ie: have active directory domain, correct user setup,IIS setup, application pool etc.

I have attempted to create a few projects. The first project attempted had the first error. Every project thereafter had the second error.

Any ideas?
ERROR ON FIRST PROJECT CREATION FAILED AFTER IMPORT

begin Exception entry
Time: 06/13/2005 09:05:40.875
Module: Initializer
Event Description: Initialization for plugin "Microsoft.Pcw.Rosetta" failed with error: "Failed to retrieve projects from the report server"
Exception Type: Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.RosettaInitializationException
Exception Message: Failed to retrieve projects from the report server
Stack Trace:
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.RosettaReportUploader.CheckForProjectFolder(PrivateData data, String projectName)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.RosettaReportUploader.Initialize(ProjectCreationContext context)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.PluginInitializer.InitializePlugins(MsfTemplate template, ProjectCreationContext context)
-- Inner Exception --
Exception Type: System.Net.WebException
Exception Message: The operation has timed out
WebException: Status : Timeout
WebException : ToString() = System.Net.WebException: The operation has timed out
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.VisualStudio.ELead.ReportManager.RosettaProxy.ReportingService.ListChildren(String Item, Boolean Recursive)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.RosettaReportUploader.CheckForProjectFolder(PrivateData data, String projectName)
Stack Trace:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.VisualStudio.ELead.ReportManager.RosettaProxy.ReportingService.ListChildren(String Item, Boolean Recursive)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.RosettaReportUploader.CheckForProjectFolder(PrivateData data, String projectName)
-- end Inner Exception --
end Exception entry
ERROR ON SECOND & THIRD PROJECT CREATION FAILED AFTER IMPORT

begin Exception entry
Time: 06/13/2005 09:21:01.250
Module: Engine
Event Description: Task "WSS.WssPortal" failed
Exception Type: System.Net.WebException
Exception Message: The operation has timed out
WebException: Status : Timeout
WebException : ToString() = System.Net.WebException: The operation has timed out
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.VisualStudio.ELead.WssProxy.Admin.CreateSite(String Url, String Title, String Description, Int32 Lcid, String WebTemplate, String OwnerLogin, String OwnerName, String OwnerEmail, String PortalUrl, String PortalName)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.WssSiteCreator.CreateSite(WssSiteData siteCreationData, ProjectCreationContext context)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.WssSiteCreator.HandleSiteCreation(ProjectCreationContext context, XmlNode taskNode)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.WssSiteCreator.Execute(ProjectCreationContext context, XmlNode taskXml)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.ProjectCreationEngine.TaskExecutor.PerformTask(IProjectComponentCreator componentCreator, ProjectCreationContext context, XmlNode taskXml)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.ProjectCreationEngine.RunTask(Object taskObj)
Stack Trace:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.VisualStudio.ELead.WssProxy.Admin.CreateSite(String Url, String Title, String Description, Int32 Lcid, String WebTemplate, String OwnerLogin, String OwnerName, String OwnerEmail, String PortalUrl, String PortalName)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.WssSiteCreator.CreateSite(WssSiteData siteCreationData, ProjectCreationContext context)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.WssSiteCreator.HandleSiteCreation(ProjectCreationContext context, XmlNode taskNode)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.WssSiteCreator.Execute(ProjectCreationContext context, XmlNode taskXml)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.ProjectCreationEngine.TaskExecutor.PerformTask(IProjectComponentCreator componentCreator, ProjectCreationContext context, XmlNode taskXml)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.ProjectCreationEngine.RunTask(Object taskObj)
end Exception entry

06/13/2005 09:21:01.343 | Module: Engine | Thread: 9 | Task "WSS" will not be run because a prior task failed
06/13/2005 09:21:01.343 | Module: Engine | Thread: 9 | Task "Rosetta" will not be run because a prior task failed
06/13/2005 09:21:01.343 | Module: Engine | Thread: 9 | Task "Rosetta.Site" will not be run because a prior task failed
06/13/2005 09:21:01.343 | Module: Engine | Thread: 9 | Task "Rosetta.Populate Reports" will not be run because a prior task failed
begin Exception entry
Time: 06/13/2005 09:21:01.343
Module: Engine
Event Description: Project creation failed
Exception Type: Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.AllTasksDidNotSucceedException
Exception Message: One or more tasks failed during project creation execution
Stack Trace:
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.ProjectCreationEngine.PerformAllTasks(ITaskPerformer taskPerformer, ProjectCreationContext creationContext, XmlNode templateXml)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.EngineStarter.RunEngine(Boolean isValidationRun, String templateFolder)
at Microsoft.VisualStudio.TeamSystem.ELead.ProjectCreationNew.EngineStarter.TryCreateProject(ILogHandler logHandler, String& completionMessage)
end Exception entry

06/13/2005 09:21:01.390 | Module: Engine | Thread: 10 | Attempting to delete MSF folder "C:\Documents and Settings\TSsetup\Local Settings\Temp\PCW_06-13-2005_09.12.56"
06/13/2005 09:21:12.828 | Module: Engine | Thread: 10 | MSF folder "C:\Documents and Settings\TSsetup\Local Settings\Temp\PCW_06-13-2005_09.12.56" removed

Thanks again,
Rita

Rita at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Setup...
# 3

Post beta2 uses site templates and not site definitions. You should be able to do that with the post beta 2 bits (if you have access to the latest CTP).

-Ravi

RaviTerala at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Setup...

Visual Studio Team System

Site Classified