In such case, you can create a PowerShell
script. I am not having the exact code, but I used the following logic:
For First Time
- Add the Sandbox Solution using
Add-SPUserSolution
.
- Install the solution using
Install-SPUserSolution
.
- Now get solution ID using
Get-SPUserSolution
- Next get all the features within solution using
Get-SPFeature
- Check if feature is not enabled use
Enable-SPFeature
cmdlet to activate it.
When Updating
Simply run following commands:
- Using cmdlet
Update-SPUserSolution
you can update already activated sandbox solutions. The key point is -ToSolution
parameter/attribute. Where you need to pass on the new Solution name. I used versioning in file name to overcome same solution identity conflict.
- Now you can repeat step 3 to 5 from above (in-case new features are added).