locked
Feature deployment scope RRS feed

  • Question

  • Hi all
    I have some confusion regarding with the sharepoint feature deployment scope. I am developing a customized masterpage as a site feature. I deploy the feature using the setup file generated by vs2008  extensions for wss3.0. when i deploy this feature, i set the url to be http://localhost:90.
    Then I want to deploy this feature to another site(port 91) . the setup file told me the feature is already there. Then I check the site features in site 91. all features I deployed into site 90 is already there. It seems these features are deploy in farm level. How do I change the setting to let it only deploy to site level.

    Cheers
    Victor
    Tuesday, September 16, 2008 3:43 AM

Answers

  • Victor,

    It appears that your confusing the feature scope (where the feature is activated) with the deployment of the feature. When a feature is deployed, regardless of the scope, it is available to the whole farm for activation. So for example if you have a site scoped feature and deploy that feature it will be available under site collection features for all web applications in the farm. The only way you can prevent this is to possibly make the feature not visible, the feature is technically still available on all site collections but does not show up and must be activated via the command line (or API).

    Hope this clears it up.

    Regards,

    Josh Carlisle
    • Marked as answer by VictorShi Tuesday, September 16, 2008 4:19 AM
    Tuesday, September 16, 2008 4:03 AM

All replies

  • Victor,

    It appears that your confusing the feature scope (where the feature is activated) with the deployment of the feature. When a feature is deployed, regardless of the scope, it is available to the whole farm for activation. So for example if you have a site scoped feature and deploy that feature it will be available under site collection features for all web applications in the farm. The only way you can prevent this is to possibly make the feature not visible, the feature is technically still available on all site collections but does not show up and must be activated via the command line (or API).

    Hope this clears it up.

    Regards,

    Josh Carlisle
    • Marked as answer by VictorShi Tuesday, September 16, 2008 4:19 AM
    Tuesday, September 16, 2008 4:03 AM
  • Hi Victor,

    Josh is right on.  When you deploy from Visual Studio, it will deploy the feature into your farm and activate it in the single site collection you specify.  If you want to also use it in other site collections, you just need to activate it in those as well.  In your case, it sounds like this would be for the root site collection for your 91 web application. 
    Tuesday, September 16, 2008 4:14 AM
  • Thank a lot Josh~~~ This is really helpful
    Victor
    Tuesday, September 16, 2008 4:19 AM