Question

I am using a feature (with feature receiver) to create some lists by code on "my site". The feature is site scoped and is activated by a farm scoped feature (using feature stapling) when a new my site is created.

So far, so good, but... When I edit the code in the feature receiver to add some more functionality, and upgrade the .wsp which holds the feature, the upgrade does not seem to work.

The feature is activated automatically when a new my site is created, but executes the old code. If I deactivate the feature and then activate the feature manually then the new code is executed.

I am having problems understanding this behavior. Any similar experience? Any ideas how to fix this ?

Was it helpful?

Solution

We had the same problem couple of months ago, after digging too much we open a MSFT case. Here how we solve it.

  • After updating the wsp, we check if new dll deployed.
  • We also check if updated DLL loaded
  • Recycle the SharePoint timer services on all servers.
  • We use the decompiler tool to find which assembly loaded.

In our case, even after updating( many time retracting and re deploying) still old DLL loading. so once we recycle the timer services new DLL loaded.

OTHER TIPS

In most common cases you forgot to close the current powershell. This holds the old assembly in the memory. After adding and installing your feature, you MUST close the powershell. Reopen it and execute your activation. Now you het your right assembly used.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top