how to add a solution(.wsp) to a site on office 365 sharepoint online using powershell.

I have a site on office 365 sharepoint and i am an admin to it. i tried uploading and activating a solution file(.wsp) to solution gallery of the site. The .wsp file uploaded successfully but on activation of that it gives error 

error:

This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'cc218449-78b3-4430-b401-4884977560e2' failed validation, file manifest.xml, line 11, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'. Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: oplh6595a-a6hg-416f-a85f-a173bp03dda6 Date and Time: 30/10/2013 13:33:18

then instead of using solution gallery i tried using powershell to add and deploy solution but it too throws an error.

powershell error: 

Add-SPOSolution : The term 'Add-SPOSolution' is not recognized as the name of a cmdlet, function, script file, or 
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try 
again.
At line:1 char:1
+ Add-SPOSolution D:\wsp\Sharepoint.wsp
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Add-SPOSolution:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I am new to Office 365 and powershell. any help will be appreciated.

Answer
Answer

Hi K_Anand,

I'd like to explain that the name "apps for SharePoint" is changing to "SharePoint Add-ins". Please refer to: New name for apps for SharePoint.

Besides, to use the SharePoint Add-ins, you can refer to the following two articles:

Get started creating SharePoint-hosted SharePoint Add-ins.

SharePoint Add-ins compared with SharePoint solutions.

Regards,

Jared

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated May 25, 2020 Views 3,440 Applies to: