If you ever tried to deploy your a SharePoint app to a SharePoint online team site from Visual Studio, there is a chance that you have seen the following error:
“Sideloading of apps is not enabled on this site”.
This happens, because in order to deploy apps to a site-collection one of the following must be true.
- The site-collection must be the root site collection if it’s a host named site-collection (all SharePoint online site-collections are host named)
- The site-collection freatues, Developer Site (e374875e-06b6-11e0-b0fa-57f5dfd72085) or App Sideloading (AE3A1339-61F5-4f8f-81A7-ABD2DA956A7D) must be enabled
Per default the developer site feature is only enabled for the developer site template, the App Sideloading feature is also not enabled per default for any site templates (to my knowledge). So to fix the error we have to enable any one of the features, but this is not possible in SharePoint online as both features are flagged as hidden.
The work around is to create a sandbox solution where you create a dummy feature that have an activation dependency on the App Sideloading feature. Once you install the sandbox solution, you can enable your dummy feature and that way, enable the app sideloading capabilities.
I have attached a WSP that contains a sandbox solution with just that. If you want to look at the code it is located here: https://github.com/sjkp/EnableAppSideloading
After it has been installed find the site-collection feature EnableHiddenAppSideLoading and activate it.