The greatest benefit to packaging your functionality into a SharePoint solution is for ease and speed of deployment. Without a solution, deploying a feature involves copying the feature and its files into the 12 hive from the command line followed by the execution of stsadm commands to install the feature. If the feature already exists, you will also need to deactivate and uninstall it before installation. This amounts to a substantial amount of manual work for deployment. Using a solution eliminates the need for a lot of this manual work.
This article will take the content type feature and solution that I created in the previous two posts and walk through the process of deploying the solution to
the farm. I will activate the feature in Site Settings and demonstrate how to use the Content Type gallery to validate the content type.
1. Add the solution to the farm
At the command line, use stsadm to add the solution to the farm:
stsadm -o addsolution -filename CharacterSheet.wsp
2. Deploy the solution using Central Administration
Open up Central Administration and navigate to the Operations tag. Under the Global Configuration section, click on the link for Solution Management. The solution management page provides you with a listing of all solutions installed on this farm and their deployment status. As this is a new solution, its deployment status is not deployed. Click on the name of the solution to access the deployment page where you click on the Deploy link to deploy the solution. In the last page, you can schedule the deployment for a particular time or you can leave the default schedule for an immediate deployment.
Open up Central Administration and navigate to the Operations tag. Under the Global Configuration section, click on the link for Solution Management. The solution management page provides you with a listing of all solutions installed on this farm and their deployment status. As this is a new solution, its deployment status is not deployed. Click on the name of the solution to access the deployment page where you click on the Deploy link to deploy the solution. In the last page, you can schedule the deployment for a particular time or you can leave the default schedule for an immediate deployment.
3. Activate the feature in Site Settings
Now that the solution is installed and deployed across your farm, you will be able to see the content type in your site collection features. Access site settings and click the link for site collection features. In the listing of site collection features, the new feature will appear as a deactivated feature; click the activate button to activate the feature. Activating the feature will add the content type to your content types gallery.
Now that the solution is installed and deployed across your farm, you will be able to see the content type in your site collection features. Access site settings and click the link for site collection features. In the listing of site collection features, the new feature will appear as a deactivated feature; click the activate button to activate the feature. Activating the feature will add the content type to your content types gallery.
4. Validate the content type in the Content Type gallery
Finally, it is always a good idea to validate your content type in the gallery. From site settings, click the link for the content types. This will give you a listing of the content types that are installed on this site. The new content type should be in this gallery.
Finally, it is always a good idea to validate your content type in the gallery. From site settings, click the link for the content types. This will give you a listing of the content types that are installed on this site. The new content type should be in this gallery.
Now that the content type is properly installed and activated, it can be used in document libraries as a document type. At this point the content type does not include any additional fields beyond those that the document content type provides so our content type is doing little for us at this point.