Remove the assembly reference from your Sandbox solution created in Visual Studio

Introduction

By default, the Visual Studio 2015 and 2013 templates for SharePoint Sandbox solutions automatically include an assembly-to-Sandbox solution file (wsp). This is true regardless of whether you have added any actual code in the solution. This process can be controlled by the Include Assembly In Package setting in the Visual Studio Project Properties view. The default value for this property is True. If you have created your Sandbox solution in Visual Studio and it doesn't contain actual code, you should change this setting to False. This makes sure that your Sandbox solution is fully declarative and doesn't contain any actual code.

Procedure

To change an existing Sandbox solution that's created in Visual Studio, follow these steps:

  1. Open the existing Visual Studio project for the Sandbox solution.

  2. Open the Properties dialog box for the project. To do this, open the Visual Studio project in Solution Explorer, and then press the F4 key.

  3. Locate and change the Include Assembly In Package property setting to False.

    Screenshot of the Properties dialog box, changing the Include Assembly In Package property to False.

  4. Recompile and then publish the new version of the Sandbox solution.

More information

For more information, see Removing Code-Based Sandbox Solutions in SharePoint Online.

Still need help? Go to SharePoint Community.