SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


Does anyone know a way to activate a sandbox solution in SharePoint Online without having the site collection features automatically activated?

Background info:

I have done a bit of testing with various methods of solution activation and I was able to confirm that activating user solutions from either the UI or PowerShell will cause the site collection features to be automatically activated. Activating a user solution programmatically via code however does not cause the site collection features to be automatically activated. eg. by using the SPSite.Solutions.Add() method.

I thought I had the answer with the programmatic approach which was working fine in my test console application but when I moved it to my sandbox solution project, it doesn’t work because the SPSite.Solutions property is not available in sandbox solutions ( I’ve also had a look at the client object model and it doesn’t look the Solutions property is available there either.

The project I’m currently working on will be eventually deployed to SharePoint Online (multi-tenant) so any farm based solutions are out of the picture.

share|improve this question

In the feature xml you can specify the following property 'ActivateOnDefault' which allows you to set if you want to activate the feature by default or not.

If you set this property to 'FALSE' your feature should not get activated when your sandbox solution is activated.

You can specify this property in the feature xml as shown below:

<Feature xmlns="" Title="Some feature" ActivateOnDefault="FALSE" Description="Deploys some stuff" >
        <ElementManifest Location="Consto_PageLayouts\Elements.xml" />

Or using visual studio click on the feature and in the feature properties panel you can set it there enter image description here

share|improve this answer

Your Answer


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.