In SharePoint 2010 the Health Analyzer shows an 'Missing Server Side Dependencies' error message. In the past a SharePoint solution was deployed, but currently it don't exist in the farm anymore. But something is still referencing to particular files in the Features folder.

The SharePoint solution sets a custom master page on each site in a Site Collection. When the feature is deactivated, the master pages are set back to the original v4.master and the custom master pages are removed. I receive the following error message:

[MissingSetupFile] File [Features\SharePoint2010CompanyBranding_CompanyBranding\MasterPageGallery\Company.master] is referenced [2] times in the database [WSS_Content_support.sharepoint.test.net], but is not installed on the current farm. Please install any feature/solution which contains this file. One or more setup files are referenced in the database [WSS_Content_support.sharepoint.test.net], but are not installed on the current farm. Please install any feature or solution which contains these files.

Does anybody know how to fix this?

  • Are you certain that none of the subsites reference this master page?
    – Dave Wise
    Commented May 5, 2011 at 15:31
  • Dave, yes i'am sure that none of the subsites were referencing the master page. But the master pages weren't removed from the Master Page Gallery while deactivating the feature, which is (potentially) be causing this problem. But to remove them manually is also hard.. Check my reaction on Jim Browns answer. But thanks for you help!
    – RBDev
    Commented May 5, 2011 at 17:32
  • Check this Missing server side dependencies issue Commented Sep 29, 2018 at 13:12

5 Answers 5


You might be able to track down the old references using SharePoint Manager from CodePlex: http://spm.codeplex.com/

Make sure you use a FeatureReceiver when deploying Master pages and use the FeatureDeactivating event to clean up after yourself. SharePoint won't remove these things for you because it doesn't know if you're done with them and doesn't want orphans.

  • 1
    Thanks for your help! The solution wasn't removing the master pages from the 'Master Page Gallery', which is the cause of the problem I think. I manually removed the file from the Gallery, but then the error didn't go away. Next I tried you suggestion (SPM), but I was unable to find the file in the Gallery. I executed the query below on the database and I removed the record (it's not production ;-)). I know this ain't the way to go, but in the end it did make the error go away. Should there be another way to fix this? select * FROM [dbo].[AllDocs] WHERE LeafName like '%company%'
    – RBDev
    Commented May 5, 2011 at 17:29

I was able to fix this by removing the old versions of the page that referenced the web part. I restored version 1 created by the system account. Then it gave me a warning saying that it didn't use the right template and I needed to click okay to fix it. After that, I went into page history, versioning, and removed all the older versions. Then I went into the recycle bin and deleted them. Then I went into the site collection recycle bin and permanently deleted them.


I always use the following script to remove missing server side dependencies:

    Author: Benny Skogberg 2013-03-22

    1. To run the script - add your GUID on the last line of this script
       Central Admin MissingWebPart Class.

       [MissingWebPart] WebPart class [a3d13f93-34f0-6392-a3e9-1af313264105] 

    2. Add your SqlServer name on the last line of this script.

    3. Add the SqlDatabase name on the last line of this script.
       is referenced [33] times in the database [MyDatabase]

    The output would look like the following (on several rows): 

    Id             : 42684a96-d54b-4f51-872d-e1d07212a112
    SiteId         : 53c7130e-99c8-48b7-b35c-4276aa4ac241
    DirName        : Workplaces/Country/Pages
    LeafName       : default.aspx
    WebId          : eecd38b2-38c5-46f7-a3cf-3e3006eb2eae
    ListId         : 48b3d152-c8eb-49fd-be00-4c748d9ae264
    tp_ZoneID      : zone1
    tp_DisplayName : 

    Concatenate the [site collection URL] + [DirName] + [LeafName] + ?contents=1
    and you will be able to remove the web part with errors

function Run-SQLQuery ($SqlServer, $SqlDatabase, $SqlQuery)
    $SqlConnection = New-Object System.Data.SqlClient.SqlConnection
    $SqlConnection.ConnectionString = "Server =" + $SqlServer + "; Database =" + $SqlDatabase + "; Integrated Security = True"
    $SqlCmd = New-Object System.Data.SqlClient.SqlCommand
    $SqlCmd.CommandText = $SqlQuery
    $SqlCmd.Connection = $SqlConnection
    $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
    $SqlAdapter.SelectCommand = $SqlCmd
    $DataSet = New-Object System.Data.DataSet

Run-SQLQuery -SqlServer "<DBSERVER>\<INSTANCE #>, <PORT>" -SqlDatabase "<Database>" -SqlQuery "SELECT * from AllDocs inner join AllWebParts on AllDocs.Id = AllWebParts.tp_PageUrlID where AllWebParts.tp_WebPartTypeID = 'a3d13f93-34f0-6392-a3e9-1af313264105'" | select Id, SiteId, DirName, LeafName, WebId, ListId, tp_ZoneID, tp_DisplayName | Format-List

It's been my experience that Missing server side dependencies are the result of solutions that are improperly retracted, amongst other things; but for the most part.

Check out my blog post that describes one semi-non-envasive approach to resolving this: http://anothersharepointblog.com/missing-server-side-dependencies-reference

Also: take a look at the get-spscripts site's information on this topic, I've found it to be the best resource: http://get-spscripts.com/2011/06/removing-features-from-content-database.html


Retract the custom solution(s) and redeploy them.

I faced this error after extending the webapplication and configuring the AAM. After full crawl this error was shown in the health analyzer.

I had retracted and deployed the solutions from Central administration --> System settings --> Manage farm solutions under Farm management group.

Once all solutions redeployment is complete, I tried to reanalyze this issue.

Within minutes the error has gone.

Note: Please be prepared for the impact of the custom solution redeployment. In my farm master pages were provisioned through custom solution. Sites were breaking for the time period when I was retracting and deploying the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.