Deploying SharePoint Features To A Multiple Server Farm

I recently deployed some features, mainly web parts, to a client’s load balanced SharePoint farm. The features were created with the Visual Studio 2008 extensions for Windows SharePoint Services. When using features created with VSeWSS they work fine on a simple, non-load balanced, single server farm.

However when I tried to run the setup file produced by VSeWSS I got an error like “the feature is not available on the farm”. The reason is related to the following sentence from the stsadm installfeature operation’s help documentation: “Farm-scoped features are also automatically activated during this [installfeature] stage. Other features might still need to be activated.”

Now, if you open the feature.xml file, created by VSeWSS and look at the Feature element, you’ll see it has the following attribute: Scope=”Site” .

This means that the feature is defined at the Site level, and that it needs to be installed and then activated on a multiple server farm configuration. The standard VSeWSS setup.bat only takes care of activating the feature: “%SPAdminTool%” -o activatefeature -id 87f20850-ad52-4785-a680-195942270020 -url %TargetSiteUrl% . Whoops, that will indeed cause some problems.


First install the feature before activating it. There is one little gotcha here. Stsadm’s installfeature operation does not provide an option to specify the feature’s GUID. It only supports filename or name, and as you can expect VSeWSS only uses features’ GUIDs. So we have to modify setup.bat to use the file name, instead of the GUID and add the installfeature command for each feature:

“%SPAdminTool%” -o installfeature -filename WebPartFeature\feature.xml
“%SPAdminTool%” -o activatefeature -name WebPartFeature -url %TargetSiteUrl%

Cool, problem solved! If you don’t know this before hand, it can take a while to figure out.

Visual Studio 2008 extensions for Windows SharePoint Services


One Comment on “Deploying SharePoint Features To A Multiple Server Farm”

  1. openlandscape says:

    The following scenario occurs:
    1. You deploy web part features as part of a .wsp solution.

    2. Somehow the .wsp solution goes missing from SharePoint’s solution store.

    3. You try to remove the web part features. Everything looks fine, except SharePoint complains that the solution does not exist.

    4. You look in the features folder in 12 hive & see the individual web part feature files still remain.

    Solution: Redeploy ONLY the .wsp solution, to give one to SharePoint. Then remove/uninstall/retract the solution & web parts as you would normally do.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s