Thursday, March 10, 2016

Missing server side dependencies



Missing server side dependencies in SharePoint  is one the main problem that stops being upgraded or migrate to next version of the SharePoint.

SharePoint administrator has to take prompt action on this problem on his farm.


 

The "SharePoint Health Analyzer" report this problem under "Configuration" category and you have to take the manual job to delete these missing server side dependencies.

Example,If you are installing the WSP package that contains the features and webparts, that will create the related SharePoint artifact folders on the server  such as folder name with feature under \Template\Features and user controls under CONTROL TEMPLATE so on.

When you retracting the WSP package from the farm, it should wipe out all the folders that created on deploying the solution.

You have to create the batch file to disable/uninstall the feature while retracting them.


Same analogue, will be applied the missing server dependencies , even though  you retracted package from the server , feature / webpart name references will not be deleted from the "SharePoint_Admin_Content Database." Even though you deleted the web config entry that related to missing features, could be "" list.

This will be called "Orphaned features" in the SharePoint.Before going to look into resolve this problem, we should learn What is the reason ? why the missing server side dependencies are clogged in the SharePoint server ?

The reason is very straight forward, you might forcefully uninstall the solution without deactivating the features that are scoped to site / web / web application and Farm.

How to prevent the "Missing Dependencies" issues on the SharePoint.

Always use the "Feature event receiver class" to delete the feature folder from the server when its deactivating.

Create the "Health Analyzer definition rule to "Repair automatically" to yes.




Somehow, we missed and found so many "Missing Server Side dependencies", now  we will see on how to resolve this configuration problem,

Resolution : #1

$feature = Get-SPFeature | ? { $_.DisplayName -eq "Orphaned feature reported in HealthAnalyzer" }
$feature.Delete()
Sometime, the webpart also can be missing and reported by Health Analyzer.

I just open the content database and select the table dbo.AllWebParts and fired the delete command.(For safer side, have your Content DB backup).

Resolution : #2

DELETE  from [WSS_Content].[dbo].[AllWebParts] where tp_WebPartTypeId='c6f6e5a5-1038-13a7-87c1-0db44446d99a'

Resolution: #3,

Download the SharePoint Utility called "SharePoint Feature Administration and Cleanup" from codeplex that will help you to identify the faulty features on the farm.


Missing dependencies in SharePoint