Can you still use sandbox solutions in 2017?

The answer to this question is yes, but… not for all situations and not all types of sandbox solutions.

SharePoint sandbox solutions were introduced with SharePoint 2010 and provided a mechanism to execute code outside of the ISS worker process. The sandbox solutions do not affect the entire farm; they are installed per site collection and they can be installed by the site collection administrator.

Every day I deal with SharePoint users that are extremely afraid of using sandbox solutions mainly because the message about this type of solutions being deprecated was not properly communicated by Microsoft.

What you should avoid?

Code-based sandbox solutions should be avoided. On SharePoint 2013 they still work, it’s still possible run them on SharePoint 2016 with a few tricks, but on SharePoint Online they are no longer supported.

Since July 2016 is no longer possible to activate code-based sandbox solution on SharePoint online, if you try to do it you will see the message bellow.

Open SPD folder

No longer possible to activate code-based sandbox solution on SharePoint online

Any sandbox solution that uses the server-side API is deprecated since 2014 and should be replaced by the App/Add-in model, this means that you no longer can create solutions with:

  • Web parts that use sandbox code, this even affects web parts that only use code to store the properties
  • Event Receivers
  • Feature Receivers
  • Workflows

What you can continue to use?

No-code sandbox solutions (NCSS) are still available and were not deprecated by Microsoft. In this type of solutions, you can use declarative markup and JavaScript and they are still valid for:

  • Web parts that use only JavaScript
  • Site Templates
  • Lists
  • Content Types
  • Custom Actions
  • Branding elements, like custom master pages and alternate CSS files

By default, all sandbox solutions created with Visual Studio templates include a .net assembly which needs to be disabled to get a fully declarative solution.

To disable the assembly in the project, with Visual Studio you can set the property “Include Assembly in the Package to false” as shown in the image bellow.

Open SPD folder

Include Assembly in the Package to false

Conclusion

It’s important to know the difference between the two types of Sandbox Solutions before starting a new project make sure you will be able to develop the solution only with declarative code and JavaScript.

For complex scenarios, you can use the App/Add-in model and the Office PNP is full of good examples that you can use as a starting point, the PNP repository is kept updated by the community and Microsoft.

If you are planning to start developing SharePoint solutions in the upcoming months, the SharePoint Framework (SPFx) is the way to go. It didn’t reach the final version yet and is only available for SharePoint Online, it will be available on SharePoint 2016 during this year with a feature pack but is not granted that it will be released for SharePoint 2013.

With all the supported methods to build solutions SharePoint developers are transforming to be web developers… this is the time to invest in your future and learn new methods and technologies and you can start by reading this article.

Bellow you have a table with all the development methods that you can and cannot use in 2017 in your SharePoint environments.

Reference:
Ferreira, J. (2017). Can you still use sandbox solutions in 2017?. [online] HANDS ON SharePoint. Available at: http://sharepoint.handsontek.net/2017/02/19/can-you-still-use-sandbox-solutions-in-2017/ [Accessed 10 Oct. 2017].

Share this on...

Rate this Post:

Share: