Blog

Five easy steps to audit your custom SharePoint solutions

3 min read
3 min read

Over the last few posts we have looked at a number of problems with full trust farm solutions in SharePoint. Yet farm solutions are still important for many users and SharePoint solutions. Some functionality can only be achieved using farm solutions and are not possible in the new SharePoint app model. Some systems will never be moved to the Cloud, and thus farm solutions become a more acceptable way of doing things.

Some examples where farm solutions are the only option to implement required functionality are:

  • Custom server side controls in page layouts or master pages.
  • Integrating custom LOB (Line of Business) applications that require custom .NET connectors for the Business Connectivity Service.
  • Customizing Central Administration.
  • Custom Visual Studio workflow actions.

When full trust farm solutions are required, it is very important to make sure these solutions are written and designed in the right way. Our own SPCAF tool can make it a lot easier to audit custom farm solutions. Follow these five easy steps to analyze and improve farm solutions with SPCAF.

1. Check code quality

SPCOP will scan the code inside farm solutions, and check it against over 600 rules. Every notification has a severity, e.g. A ‘Critical Error’ for blocking issues or ‘Information’ for less significant issues. Run the SPCOP component to make sure all Microsoft farm solution best practices are being adhered to.

2. Analyse dependencies

A custom farm solution will likely depend on other SharePoint elements or third party add-ons. For example, a farm solution might require another WSP to be installed in the farm. The SPCAF component called SPDepend will analyze all installed WSP’s and generate a report detailing all dependencies. This allows developers and system admins to ensure all dependencies are installed on the farm before installing the custom solutions.

3. Create a metrics report

The complexity of a custom farm solution can have a high impact on maintainability and upgradeability. By understanding the complexity of a custom farm solution, estimates for maintaining and deploying this solution can be assessed. The SPMetrics component will analyze the complexity of custom solutions and calculate relative complexity.

4. Create an inventory report

A custom farm solution can contain a lot of artifacts like features, list definitions, site templates, web templates, custom web parts, user controls, etc. Documenting these elements manually is a time consuming job. The Code Inventory tool in SPCAF, SPInventory, will do this automatically. It will generate a document detailing all artifacts inside custom solutions.

5. Run a code migration assessment

Even though it might not be possible to use the SharePoint App Model right now, with future improvements and changing requirements it might be possible to migrate farm solutions to the new SharePoint App model in the future. The Migration Assessment report in SPCAF will provide a guide to upgrade custom farm solutions to the SharePoint App model and help you to align with the Microsoft Office Patterns & Practices Community project. It will summarize the current implementation, and suggest alternative implementations to reduce the negative impact on any future migration. An example report can be seen here.

The SPCAF migration assessment rules are open source and available on Microsoft official OfficeDev GitHub account where we develop new rules together with Microsoft and the community. These can be also used with our Free SPCAF Migration Assessment tool We would like to encourage your participation in that to keep us up-to-date to the constantly improving guidance and award free SPCAF Professional licenses to active contributors.

Audit farm solutions before deploying

In some scenarios farm solutions might be the only solution to implement business requirements. Farm solutions are powerful and provide the ability to customize SharePoint to a large extent. Whilst not the future of SharePoint, they will have their uses for a long time yet.

They do come with drawbacks, drawbacks that can affect security, performance, and upgradeability of your SharePoint farm. We recommend auditing your custom farm solutions with SPCAF to help mitigate these risks.

Download the latest version of SPCAF here.

Subscribe to our newsletter