Thursday, August 6, 2009

Error: The template you have chosen is invalid or cannot be found

Reason: 
Day by day, your MOSS server's number of features (under C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES) will increase gradually. During the deployment, the target server may not have all the source machine features. 

So, you will get the "The template you have chosen is invalid or cannot be found" error. If you are removed the unnecessary dependant features, your "Workspace template" will work fine. 

Solution:
However, the solution is somewhat hectic. Just follow my instructions carefully. (Don't miss any step and don't ignore the naming convension.)

1. Download the STPInspector from Codeplex (http://stpinspector.codeplex.com/Release/ProjectReleases.aspx)
2. Downloaded CabArc from Microsoft (http://support.microsoft.com/kb/310618)
3. Copy STSInspector tool into MOSS Server (Important)
4. Extract Cabarc files into C:\cabarc (Follow the same name as specified here)
5. Download STP from the portal through browser. (http://Portal:80/_catalogs/wt/Forms/Common.aspx)
6. Browse & Inspect the downloaded stp using STPInspector
7. Note the Missing features GUID (which are not ticked in the result list)
8. Rename the STP file as .CAB 
9. use the CabArc to extract the contents into the folder (ex: Cabarc X Project.cab)
10.Open the Manifest.xml in notepad from the extracted files
11.Search the missing guid (which are found using STPInspector) and delete the Feature XML tag in the Manifest.XML.
12. Save the Manifest.xml
13. Make the new CAB using CabArc (Ex: CabArc N ModifiedProject.cab C:\Folder\*.*)
14. Rename the .CAB file as .STP
15. Upload this file using stsadm -o addtemplate -filename "C:\ModifiedProject.STP" -Title "STPTitle" -Description ""


Thats it. 

1 comment:

  1. How do we use STPInspector? When I downloaded it and zipped it, there were all these project files. Which one do I use?

    ReplyDelete