C# 如何为SharePoint Online设置.NET开发环境

C# 如何为SharePoint Online设置.NET开发环境,c#,sharepoint-online,C#,Sharepoint Online,我们需要将一些内容从几个on-prem系统迁移到SharePoint Online 我希望使用C#.NET,因为理想情况下,我们可以重用为on-prem SharePoint编写的代码 我在过去使用过的On-prem SharePoint代码使用如下引用: <Reference Include="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, pro

我们需要将一些内容从几个on-prem系统迁移到SharePoint Online

我希望使用C#.NET,因为理想情况下,我们可以重用为on-prem SharePoint编写的代码

我在过去使用过的On-prem 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" />
// Connect to SharePoint
SPSite site = new SPSite("http://SiteURL/");
SPWeb web = site.OpenWeb();
// Connect to lists
foreach (SPList l in web.Lists)
...
我们不再使用prem SharePoint


为了使用我们的代码访问SharePoint online,我们的开发机器上需要什么?SharePoint online不公开服务器端SDK(SSOM),因此您不能使用上述代码或引用Microsoft.SharePoint。SPO连接的可用选项有:

  • CSOM
  • JSOM
  • RESTAPI
更多参考资料:


BR

SharePoint Online不公开服务器端SDK(SSOM),因此您不能使用上述代码或参考
Microsoft.SharePoint
。SPO连接的可用选项有:

  • CSOM
  • JSOM
  • RESTAPI
更多参考资料:


BR

它是同一个产品(或者说离它很近),只是在不同的URL上。您是否尝试过将代码中的URL更改为指向您的在线版本?尝试一下会很好,但不,我无法真正尝试,因为我实际上没有引用的DLL。它是同一个产品(或者说是足够接近),只是位于不同的URL。您是否尝试过将代码中的URL更改为指向您的在线版本?尝试一下会很好,但不,我不能尝试,因为我实际上没有引用的DLL。谢谢。我想CSOM就是我要找的。如果您没有SharePoint服务器,从何处获取这些DLL以供参考?只需从NuGet软件包获取即可。或者谢谢你。我想CSOM就是我要找的。如果您没有SharePoint服务器,从何处获取这些DLL以供参考?只需从NuGet软件包获取即可。或