none
Cannot activate sandboxed solutions in SharePoint Online

    Question

  • Since today morning SharePoint Online is not letting me activate sandboxed solutions as I usually do:

    Solution Gallery -> Upload Solution -> Activate Solution

    Until before today morning, the activation button was always enabled. Now I'm not able to publish my solution anymore. The piece of informative text that appears just above the button is this:

    " Activation of solutions with sandboxed code has been disabled in this site collection. Contact your administrator to enable activation using the guidance published here. "

    Searching throughout the web, I found amazing information about this issue, and its possible solutions.

    After a couple of hours of searching, I summarized the reasons to just two: 1) Not enough permissions level or features and/or 2) Sandboxed service not being running.

    After trying some solutions out (neither of them worked), I decided to move on and publish my test sandboxed solution to another site collection, that was created with another completely different Office365 tenant, the same issue happened. Then I managed to get my hands into another completely different site that my coworker works on, and it was the same!!.

    My question is, Is that a global issue, a regional issue, or just a big crazy coincidence?

    Thanks in advance

    Best regards.

    Monday, July 25, 2016 10:34 PM

Answers

  • Hello GiovanyIT,

    Apparently it seems that Microsoft has just started to block provisioning of code via. Sandbox solutions. If you remember, Sandbox code was already "deprecated" long back, but it was still supported. Now with this new error that you reported, it seems as if it is not supported anymore (at least directly like it used to work before).

    Even I faced the same problem, and surely this is something that has changed just during last weekend.

    Solution:

    What you can try is: Go to you package explorer in Visual Studio -> Manifest tab -> Edit options -> Overwrite Generated XML and edit manifest in the XML editor, and then make sure that you remove the following <Assemblies /> node completely. This is the problematic artifact which yields the error on solution activation in O365.

    <Assemblies>
         <Assembly Location="{your-assembly}.dll" DeploymentTarget="GlobalAssemblyCache" />
    </Assemblies>

    Then rebuild your package and try to deploy your solution.

    Other way round (simpler approach), you can just set "Include Assembly In Package = FALSE" in the properties of you Sandbox project. It would probably be set as TRUE by default. This should do the same changes which I mentioned above to the package manifest.xml file.

    What we are doing here is just removing the code part (managed code) from the package, which Microsoft doesn't like much these days ;-) Of course, I assume that your custom solution does not include any functionality around managed code, as it is against the best practices.

    This seem to have worked for me. All the best!

    Let me know, if it helps your case too!

    Thanks!

    BR,
    Devang

    • Edited by Devang Bhavsar Tuesday, July 26, 2016 6:11 AM
    • Marked as answer by GiovanyIT Wednesday, August 3, 2016 7:01 PM
    Tuesday, July 26, 2016 5:08 AM
  • Hi to all.

    Here a solution that worked for me: my sandboxed solution does not contain server side compiled code.

    • Download from my blog zCabMaker to allow you to decompress and compress WSP.
      http://zsvipullo.blogspot.it/2011/11/zcabmaker.html
    • Decompress your WSP in a local folder
    • Open the Manifest.xml file in the root of your decompressed wsp with notepad
    • Remove the assembly section
    • Delete the DLL file
    • Compress the content of this folder in a new WSP File
    • Upload WSP into solution store
    • Activate the solution


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    • Marked as answer by GiovanyIT Wednesday, August 3, 2016 7:01 PM
    Wednesday, July 27, 2016 7:00 AM

All replies

  • This happened to our SharePoint Online environment yesterday. I tried activating the solution today and received the same message. This might be a global issue.
    Tuesday, July 26, 2016 2:37 AM
  • Same thing for mine. Infopath form solution no longer deploying, when nothing really changed about the solution. 
    Tuesday, July 26, 2016 2:43 AM
  • Hello GiovanyIT,

    Apparently it seems that Microsoft has just started to block provisioning of code via. Sandbox solutions. If you remember, Sandbox code was already "deprecated" long back, but it was still supported. Now with this new error that you reported, it seems as if it is not supported anymore (at least directly like it used to work before).

    Even I faced the same problem, and surely this is something that has changed just during last weekend.

    Solution:

    What you can try is: Go to you package explorer in Visual Studio -> Manifest tab -> Edit options -> Overwrite Generated XML and edit manifest in the XML editor, and then make sure that you remove the following <Assemblies /> node completely. This is the problematic artifact which yields the error on solution activation in O365.

    <Assemblies>
         <Assembly Location="{your-assembly}.dll" DeploymentTarget="GlobalAssemblyCache" />
    </Assemblies>

    Then rebuild your package and try to deploy your solution.

    Other way round (simpler approach), you can just set "Include Assembly In Package = FALSE" in the properties of you Sandbox project. It would probably be set as TRUE by default. This should do the same changes which I mentioned above to the package manifest.xml file.

    What we are doing here is just removing the code part (managed code) from the package, which Microsoft doesn't like much these days ;-) Of course, I assume that your custom solution does not include any functionality around managed code, as it is against the best practices.

    This seem to have worked for me. All the best!

    Let me know, if it helps your case too!

    Thanks!

    BR,
    Devang

    • Edited by Devang Bhavsar Tuesday, July 26, 2016 6:11 AM
    • Marked as answer by GiovanyIT Wednesday, August 3, 2016 7:01 PM
    Tuesday, July 26, 2016 5:08 AM
  • Hi to all.

    Here a solution that worked for me: my sandboxed solution does not contain server side compiled code.

    • Download from my blog zCabMaker to allow you to decompress and compress WSP.
      http://zsvipullo.blogspot.it/2011/11/zcabmaker.html
    • Decompress your WSP in a local folder
    • Open the Manifest.xml file in the root of your decompressed wsp with notepad
    • Remove the assembly section
    • Delete the DLL file
    • Compress the content of this folder in a new WSP File
    • Upload WSP into solution store
    • Activate the solution


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    • Marked as answer by GiovanyIT Wednesday, August 3, 2016 7:01 PM
    Wednesday, July 27, 2016 7:00 AM
  • Also this solution suggested by Devang worked for me.

    Other way round (simpler approach), you can just set "Include Assembly In Package = FALSE" in the properties of you Sandbox project. It would probably be set as TRUE by default. This should do the same changes which I mentioned above to the package manifest.xml file.




    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    Wednesday, July 27, 2016 7:36 AM
  • However take a look at this...


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    • Proposed as answer by KCRyan318 Wednesday, July 27, 2016 6:17 PM
    Wednesday, July 27, 2016 8:34 AM

  • Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    Wednesday, July 27, 2016 8:35 AM
  • Be careful: this operation breaks workflow custom activities even if this activity does not use server side code.


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    Wednesday, July 27, 2016 8:56 AM
  • The message Bubu shows above is in the Admin Center under Health > Service Health. It says there will be an update by 8:00PM UTC, which is only about an hour and a half from now. I am going to wait and see if the next update fixes this problem. 

    Kim Ryan, SharePoint Consultant kryan@[no spam]spscholar.com

    Wednesday, July 27, 2016 6:19 PM
  • Next Update Friday, July 29, 2016 at 8:00 PM UTC

    :(


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    Thursday, July 28, 2016 6:17 AM
  • It seems the issue is still not fixed, We are even now facing this solution activation issue while activating the Microsoft provided "Microsoft Dynamics CRM List Component" solution in SharePoint online.

    Regards

    Gopi. R



    • Edited by MSR Gopi Saturday, July 30, 2016 2:55 PM
    Saturday, July 30, 2016 2:53 PM
  • looks Like MS is not going to 'fix' this. I received the following message MC73347 in my admin center:

    We’ve detected that you are using a code-based sandbox solution with your tenant account. Please be advised that we’ve moved forward on our plans to remove code-based sandbox solutions as previously announced in 2014.

    As part of the removal process, activation of new code-based sandboxed solutions, as well as updates of existing solutions are no longer available. In approximately 30 days, currently running, code-based sandbox solutions in the SharePoint Online environment will be disabled.

    We didn't receive any indication that this is going to happen (since 2014), they haven't provided a timetable, they just pulled the plug on activating sandboxed solutions...and in a few weeks they will deactivate even running solutions.

    Regards,

    Arik

    Saturday, July 30, 2016 4:53 PM
  • That means, we cannot integrate MS CRM online sandbox instance with SharePoint online anymore? Is there any other way to do that?

    Actually I was trying to activate the "Microsoft Dynamics CRM List Component" solution which is provided by Microsoft to integrate the CRM online with SharePoint online.

    Regards

    Gopi. R



    • Edited by MSR Gopi Saturday, July 30, 2016 5:45 PM
    Saturday, July 30, 2016 5:45 PM
  • Then what is the alternate to use custom code in webpart?
    Sunday, July 31, 2016 4:08 PM
  • Any updates on this? Microsoft is about to disable all sandbox solutions by the end of the month. I think it will affect many companies and their users...have anyone considered some practical alternatives? What about remote event handlers?

    Arik

    Wednesday, August 3, 2016 6:55 PM
  • Thank you very much!!!. Your answer was very helpful!!!. 

    My solution includes just a couple of visual webparts (with only html and styles), and modules where I store custom styles and javascripts. I did not include any kind of managed code aside from what is included by default when the solution is created. I tried what you said and, finally, SharePoint Online let me activate my solution!!!! but, although webparts are available in the site collection, whenever I try to add those webparts to a site page, I get following error: "$Resources:core,ImportErrorMessage;".

    Is my sandboxed solution as described above, a No Code Based one? Is it possible for that solution to be fully functional in SharePoint Online? If it is fine, what am I doing wrong?

    Thanks again!!!.

    BR

    Wednesday, August 3, 2016 8:05 PM
  • Hi!!!

    Check out my post at

    http://zsvipullo.blogspot.it/2016/08/microsoft-announcement-removing-code.html

    it describes the story of what happened and a possible solution (if supported).


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    Tuesday, August 23, 2016 7:40 AM
  • Thank You! Works like a charm. Deployed module with scripts.

    p.s.: + do not forget to activate Site Feature, like I did :).


    Independent SharePoint Developer, freelancer http://blog.sharepoint-develop.com/

    Thursday, November 24, 2016 1:20 PM
  • Hello,

    You need to repackage WSP solutions without the auto-generated assembly. You can do this by setting the Include Assembly in Package project property to false.

    Regards,

    Ash.D


    Monday, June 25, 2018 1:31 PM