【发布时间】:2020-09-29 11:20:48
【问题描述】:
我们需要将一些内容从多个本地系统迁移到 SharePoint Online。
我想使用 C#.NET,因为理想情况下,我们将能够重用为本地 SharePoint 编写的代码。
我过去使用的本地 SharePoint 代码使用如下引用:
<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" />
并像这样连接到 SharePoint:
// Connect to SharePoint
SPSite site = new SPSite("http://SiteURL/");
SPWeb web = site.OpenWeb();
// Connect to lists
foreach (SPList l in web.Lists)
...
我们不再拥有本地 SharePoint。
我们需要在我们的开发机器上拥有什么才能使用我们的代码在线访问 SharePoint?
【问题讨论】:
-
它是相同的产品(或者足够接近,无论如何),只是在不同的 URL。您是否尝试过仅更改代码中的 URL 以指向您的在线版本?
-
这本来可以尝试,但是不,我不能真正尝试它,因为我实际上没有引用的 DLL。
标签: c# sharepoint-online