Reputation: 708
We need to migrate some things from several on-prem systems into SharePoint Online.
I'd like to use C#.NET because ideally, we would then be able to re-use code written for on-prem SharePoint.
On-prem SharePoint code I've used in the past uses references like this:
<Reference Include="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL" />
<Reference Include="Microsoft.SharePoint.Client, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL" />
<Reference Include="Microsoft.SharePoint.Client.Runtime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL" />
And connects to SharePoint like this:
// Connect to SharePoint
SPSite site = new SPSite("http://SiteURL/");
SPWeb web = site.OpenWeb();
// Connect to lists
foreach (SPList l in web.Lists)
...
We no longer have on-prem SharePoint.
What would we need to have on our dev machine so that we can use our code to access SharePoint online?
Upvotes: 0
Views: 554
Reputation: 1889
SharePoint Online does not expose Server side SDK (SSOM), so you canot use above code or reference Microsoft.SharePoint
. The available options for SPO connection are:
More References:
BR
Upvotes: 2