Strange behaviour when uninstalling an activated feature

Jun 24, 2008 at 1:14 PM

Hello,

I'm having a strange behaviour when the SharePoint solution is uninstalled without manually deactivating the feature.
The problem is that when I re-install it, I have it automatically activated in the site collection features but not truly activated (FeatureActivated was not executed), I must re-activate it manually.

Note that I have parameters set in "feature.xml" like this:

...
Scope="Site"
AlwaysForceInstall="true"
ActivateOnDefault="false"
AutoActivateInCentralAdmin="false"
...

Also, FeatureId parameter is not specified in the "Setup.exe.config" file because I don't want to have the feature activated automatically.

I hope this is making some sense... :)

Thanks.

P.S. Thank you for this great tool, I really appreciate it :)

Jun 25, 2008 at 5:24 PM
Yahmose,

I'm not sure what you are trying to say the problem is.  It sounds like your feature is not activated because you don't have it specified to be activated in the config file - which is what you want.  In your second sentence you mention that you "have it automatically activated in teh site colletion features but not truly activated".  I'm not sure what you mean by that.  You may mean that you have it deployed but not activated.

Can you go into more detail on what the "strante behaviour" is?

Kirk

Yahmose wrote:

Hello,

I'm having a strange behaviour when the SharePoint solution is uninstalled without manually deactivating the feature.
The problem is that when I re-install it, I have it automatically activated in the site collection features but not truly activated (FeatureActivated was not executed), I must re-activate it manually.

Note that I have parameters set in "feature.xml" like this:

...
Scope="Site"
AlwaysForceInstall="true"
ActivateOnDefault="false"
AutoActivateInCentralAdmin="false"
...

Also, FeatureId parameter is not specified in the "Setup.exe.config" file because I don't want to have the feature activated automatically.

I hope this is making some sense... :)

Thanks.

P.S. Thank you for this great tool, I really appreciate it :)




Oct 6, 2009 at 6:28 AM

Hi,

Since you have provided ActivatedOnDefault=false andalso AutoActivateinCentralAdmin=false in feature.xml, So It may be the cause that sharepoint environment didn't activate the feature. You

can try by changing these two parameter to true. I hope it will help you.

Nov 26, 2009 at 6:06 AM

I met this problem too. I think what Yahmose mean is as following steps:

  1. Deploy Sharepoint solution with features (By default the feature is deactive)
  2. Active the feature in SharePoint
  3. Then uninstall the solution, you cannot see the feature in SharePoint anymore.
  4. Install the solution again. Then you will find the feture in SharePoint and its status is active. But actually it is not usable untill you deactive and then active it.

I think maybe this is a problem for STSADM.