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.

sandbox solutions in 2017

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

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

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.

SharePoint Online SharePoint 2016 SharePoint 2013 SharePoint 2010
Code-based Sandbox Solutions Not Supported Not Supported Deprecated Supported
No-code Sandbox Solutions Supported Supported Supported Supported
APPS / ADD-INs Supported Supported Supported Not Supported
SPFx Supported Supported* Not Supported Not Supported
Full Trust Farm Solutions Not Supported Supported Supported Supported

*At the time I’m writing this article it is not supported but will be supported during 2017.


6 Responses to “Can you still use sandbox solutions in 2017?”

  1. Mahendran

    August 22, 2018

    How are you creating Sandbox solutions for SharePoint Online? Visual Studio is expecting a SharePoint server to select “SharePoint – Empty project” template.

    Reply
    • João Ferreira

      August 23, 2018

      HI Mahendran,

      To create SandBox solutions you will need to use Visual Studio 2013.
      Detailed instructions step by step are provided in this article

      Reply
      • Mahendran

        August 24, 2018

        Thanks for your reply. I selected the same template but it is throwing this below error. (Sorry I could not attach the screenshot)

        “The required version of SharePoint Foundation or SharePoint Server is not installed on this system. The target version of the SharePoint project is 15.0.”

        Reply
        • João Ferreira

          August 24, 2018

          To build sandbox solutions you need to install visual studio on a server with SharePoint server installed.

          Reply
          • Mahendran

            August 24, 2018

            Wow ! This is what I thought.
            Previously, I used to develop sandbox solutions using such infra.
            But nowadays, people are providing sandbox solutions for SharePoint Online. I was confused.
            Thank you so much for the confirmation.

            In my new organization, we use SharePoint Online. It seems we cannot develop Sandbox solutions for Online because we do not have server.

          • João Ferreira

            August 24, 2018

            Yes without the server version is not possible to do it.
            If you are using online I suggest you to move from SandBox solutions to the SPFx.
            SPFx web parts are compatible with modern and classic environments, and by doing this you are following the latest Microsoft recommendations for SharePoint development.

Leave a Reply


Web developer focused on SharePoint branding, blogger, tech enthusiast. Travelling and sports are my addictions, knowledge and success are my daily motivations.