Link to home
Start Free TrialLog in
Avatar of Arnold Layne
Arnold LayneFlag for United States of America

asked on

Feature activation through VS

Just a theoretical question to confirm what I have seen. Easy question

I have been taking vid courses that do things, but don't explain what is really going on theoretically

I have created a feature that deploys a list instance.

I have a team site at the root, call it root site and another blank subsite under it, call it site 2

I am deploying an announcements list from VS

It is scoped to web

I am using the default deployment settings. When the deployment address is the root site, it adds the feature and activates it under site features (not site collection features). But when i go to the subsite, site 2, the feature is there under site features as well but not activated.

I thought that since it deploys it to every site, it would activate it as well since the deployment settings say so. Clearly it does not.

Changed the deployment address to point to the subsite and next deployed there.

It activates it at the subsite level. Creation date of list shows as just created

Creation date of same list on root site shows it as created in the past when I deployed to the root site and automatically activated it during previous deploy, and it still shows as activated

So when I scope a feature to web, does this mean the feature gets added to every web (subsite) but it only gets activated at the site I deployed to, even though the default deployment settings are for activate feature? Is that how this all works?

Also, does it mean that if I scope this feature to "site", it means that the feature will not only appear on all webs (sites) but also activate?

Besides the feature showing up in site collection features if I scope to site, and show up in site features if I scope it to web, does this also mean that it will activate on all sites if my deployment settings call for activation and my scope is site but not activate on all site if I scope to web?

It seems like the feature will show up on all sites either way, but is activation a key difference between site scope and web scope aside from whether it shows up under site collection features or site features?

I need to make sure i understand this.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Arnold Layne

ASKER

Thank you for the extensive explanation. Sorry if my question wasn't a little more concise, but I wanted to make it as complete and clear as possible. Your last sentence was actually the answer to my question, and it is what I suspected and have seen for myself, but I wanted some expert confirmation of this as I need to have a really solid understanding of this.

So while scope involves where the feature will be visible for activation, the specific deployment address in VS is what determines where it will actually be activated, assuming activation is even part of the deployment settings.

If I am still incorrect, please correct me, but I think I get it.

Thanks again.