ARTICLES

Home  > Articles  >  SharePoint Custom Solution Deployment: approach to more maintainable implementations
There are many features that come out of the box with SharePoint. However, more often than not – we need to tweak few things and create our own addition or few to our standard deployment.

Depending on the complexity of your custom components, you may have just a simple feature or a collection of features, web parts, schemas, resource files and many other supporting bits and pieces that contribute to your overall solution.

In this article we’re going to take a look at the recommended approaches for your custom solution deployment to ensure seamless solution installation and upgrade.

Most of the time, especially on smaller scale implementations it’s easy to forget about the effort required to deploy your solution and therefore you might end up with the situation where you need to deploy your customizations manually (that is drag and drop DLLs into GAC, and execute STSADM command to install your features). I won’t lie; this often happened to me and few months after, when my client asked me to help moving or upgrading their intranet environment, I would have a tough time recalling how many features are sitting out there on the server.

After analysing my situation I realized that centrally deployed solution packages could have saved me and IT guys maintaining the solution from lots of guess work.

For those of you who manage SharePoint infrastructure – you’ll agree that deploying SharePoint custom solution as a solution package is far more maintainable and less time consuming.

There are many applications available on the web simplifying solution deployment; one that we will take a look is “SharePoint Installer” available freely at CodePlex: http://www.codeplex.com/sharepointinstaller

Essentially, it’s GUI allowing your SharePoint server administrators to through a wizard driven process to deploy a solution file. This implementation will verify whether the solution has been already installed and whether you’d like to repair it. Also, administrator can choose which web application this solution will be installed to. This is only 10% of the features available in this simple tool. Not only it will make your installers more user-friendly but also save time writing manuals and scripts.

This installer utilizes WSP files which in this example we’ll use all familiar WSPBuilder to create.

Here are the steps required to produce the WSP file:

  1. Ensure WSPBuilder is inside a folder mimicking your 12 hive.
  2.  Ensure you have placed all of the feature definitions inside 12/TEMPLATES/FEATURES folder
  3. Ensure you have placed all of the resources (layout pages for example) inside 12/TEMPLATES/LAYOUTS folder
  4. If you have any DLLS as a part of your solution ensure they are inside a GAC folder on the same level as your 12 folder
  5. If you require any modifications or uploads to your web application folder, ensure they are placed in wwwroot folder on the same level as a GAC folder above.
  6.  Execute the following command: "WSPBuilder.exe -WSPName SolutionFile.wsp -BuildCAS false -SolutionID {ID}"

Where {ID} is a GUID representing the solution ID and SolutionFile.wsp is the name of the solution file of your choice.

Now that we have our WSP file, we’re ready to use it in our SharePoint installer application. After you downloaded/extracted SharePoint installer, you will have access to 3 files:

  1. EULA.rft – This is the End User Licence Agreement (if you require one).
  2. Setup.exe – Installer executable representing GUI and logic
  3. Setup.exe.config – Configuration file for your solution installation.

The configuration file above includes various configuration options you might require in your solution. Those options will drive user interface and the workflow required to deploy your application. For example, you might want to specify that your solution requires MOSS only. In that case installer will ensure we’re not using just WSS. For the complete list of options – please visit CodePlex project site.

Last item we need to add and refer to in our configuration file is the WSP file we have created earlier.

That is all that we need to have our solution ready for deployment. We package and send out installation package to a client where they follow self explanatory wizard and install or upgrade your customizations.

If you found this article useful please be sure to vote!

Yaroslav Pentsarskyy
Blog: www.sharemuch.com