We're continuing our series on SharePoint customization to focus on packaging our new feature for ease of deployment. Parts I and II have already covered master page customization and feature creation. Today we'll show you how to use Visual Studio to generate a WSP solution for your Sharepoint feature.
· [Part I] Master page customization to add centralized navigation, based on Marian Dumitrascu’s article at http://www.codeproject.com/KB/sharepoint/SharedNavigationProvider.aspx
· [Part II] Centralized publishing of common master pages, using Heather Solomon’s techniques outlined at http://heathersolomon.com/blog/articles/servermstpageforsitecollect_feature.aspx
· [Part III] Packaging of the feature as a WSP file, using the WSPBuilder application from Codeplex (http://www.codeplex.com/wspbuilder)
· [Part IV] Automated installation of the solution package, using the SharePoint Installer from Codeplex (again!) at http://www.codeplex.com/sharepointinstaller
Packaging
At this point, we're almost done. However, there are two additional steps to package this as a complete deployment – packaging and installation.
For packaging, we’ll use the fine WSPBuilder tool to package the feature as a wsp file. WSPBuilder can be downloaded from Codeplex at http://www.codeplex.com/wspbuilder. It installs as a project template into Visual Studio 2008.
Now that our feature is ready, start a new project in Visual Studio as a Visual C# / WSPBuilder project. You’ll see that the template generates a new solutionid.txt GUID for you automatically. This is different from the feature GUID above. We’ll use both in the final step.
You’ll also see the 12 folder has already been created for you. You will need to create the hierarchy of templates \ features \ [featurename], and under that the en-us and masterpages folders. (There's no need to create the empty folders such as PageLayouts.)
Now, use the right mouse Add | Existing Item… context menu to copy the feature.xml and provisionedfiles.xml to the FeatureName folder of your project. Next, import the master page to the masterpages folder, and the preview image (if you used one) to en-us. Last, use the Tools | WSPBuilder | Build WSP menu item to create your package. (By default, your WSP file will be in the root folder of the solution.)
i like this part of the blog:"You’ll also see the 12 folder has already been created for you. You will need to create the hierarchy of templates \ features \ [featurename], and under that the en-us and masterpages folders. (There's no need to create the empty folders such as PageLayouts.)" is very good
Posted by: propecia | 04/26/2010 at 11:34 AM