I'm trying to create a new site collection in Sharepoint Online tenant with Visual Studio.
1) I found http://msdn.microsoft.com/en-us/library/office/ms448720(v=office.14).aspx which says that the solution is available for Sharepoint Online
SPWeb mySite = SPContext.Current.Web;
SPWebCollection subSites = mySite.Webs;
However SPWeb are not recognized and "using Microsoft.SharePoint.SPContext" (http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spcontext(v=office.14).aspx) is not recognized.
2) I can create subsites for a given site collection using:
WebCreationInformation creation = new WebCreationInformation();
creation.Url = "Custom1";
creation.Title = "My Custom Site";
creation.WebTemplate = "CustomBlogTemplate";
context.Web.Webs.Add(creation);
context.ExecuteQuery();
but I don't see how I could extrapolate from that.
3) I tried using http://msdn.microsoft.com/en-us/library/office/ms462161(v=office.14).aspx and .Add() to the siteCollections
SPWebApplication webApplication = SPContext.Current.Site.WebApplication;
SPSiteCollection siteCollections = webApplication.Sites;
SPWebApplication and SpSiteCollection are not recognized and I hit a wall so many times that I have to ask is it really available for Sharepoint Online?
I have installed Sharepoint SDK and can list all the added references if needed.
Thank you in advance for help!