Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
    
Are you certain that none of the subsites reference this master page? –  Dave Wise May 5 '11 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 May 5 '11 at 17:32

7 Answers 7

up vote 2 down vote accepted

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.

share|improve this answer
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 May 5 '11 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.

share|improve this answer

follow this link http://jshidell.com/2011/09/14/sharepoint-2010-error-fixing-missing-server-side-dependencies/

share|improve this answer
2  
While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines. –  SPDoctor Aug 13 '12 at 9:48

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://www.sharepointpapa.com/blog/_layouts/15/start.aspx#/Lists/Posts/Post.aspx?ID=37

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

share|improve this answer

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.

       Example:
       [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.
       Example:
       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
    $SqlAdapter.Fill($DataSet)
    $SqlConnection.Close()
    $DataSet.Tables[0]
}

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
share|improve this answer

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.

share|improve this answer

Check this out! http://www.sharepoint-insight.com/2010/04/04/how-to-solve-missing-server-side-dependencies-8d6034c4-a416-e535-281a-6b714894e1aa-error

share|improve this answer
    
While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines. –  SPDoctor Nov 27 '12 at 23:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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