我有一个.wsp文件上载到Office 365中创建的网站集的解决方案库中。此解决方案未激活,我想激活它以编程方式。以下代码是关于如何在内部SharePoint站点上为解决方案文件实现它的示例。在Office 365(Sharepoint在线)网站集中以编程方式激活解决方案(.wsp)
SPDocumentLibrary solutionGallery = (SPDocumentLibrary)siteCollection.GetCatalog(SPListTemplateType.SolutionCatalog);
SPFile file = solutionGallery.RootFolder.Files.Add("HelloWorldSolution.wsp", File.ReadAllBytes("HelloWorldSolution.wsp"));
// Activating the solution file
SPUserSolution solution = siteCollection.Solutions.Add(file.Item.ID);
是否存在与此相同的在线共享点(Office 365),这可以通过CSOM中的客户端对象模型实现?
还有其他方法吗? REST还是JSOM? – RAHUL