Last year, I had written a post about the Dilemma of choosing .Net SDK for Azure ServiceBus Queue. This is another scenario where we have to think many times before choosing a .Net SDK for interacting with SharePoint.
Background
CSOM
Nugets
- https://www.nuget.org/packages/Microsoft.SharePoint2013.CSOM/ - v15
- https://www.nuget.org/packages/Microsoft.SharePoint2016.CSOM/ - v16.0 supports only .Net 4.5
- https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM/ - v16.1 supports latest .Net Frameworks, .Net Core and .Net
Status
Microsoft Graph SDK
Nuget
The PnP Story
These are pure open source community SDKs not directly supported by Microsoft and have no SLAs.
But we can see Microsoft as an active contributor and even aka.ms link.
https://aka.ms/pnp/coresdk/docs
PnP sites Core
Nuget
Status
PnP Framework
The PnP Sites Core supports till .Net 4.6.1 only ie Windows only. Meantime, they created another open-source library names PnP.The framework that supports .Net Standard and latest .Net Frameworks and the .Net.
The interesting thing is the PnP Framework nuget depends on the PnP Core SDK nuget.
Nuget
https://www.nuget.org/packages/PnP.Framework/
Status
Latest and supported but will eventually transition to PnP Core SDK.
PnP Core SDK
This is the real open-source successor⁸ in the PnP family. Try to use this if we ever want to use PnP SDKs.
Nuget
Status
Latest and maintained. But incomplete.
The above image credits go to the PnP Sites Core repo that explains the roadmap.Summary
Update 2023-10-05
References
- ¹ https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/jj193041(v=office.15)?redirectedfrom=MSDN
- ² https://www.c-sharpcorner.com/article/sharepoint-client-object-modal-csom/
- ³ https://devblogs.microsoft.com/microsoft365dev/net-standard-version-of-sharepoint-online-csom-apis/
- ⁴ https://docs.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0
- ⁵ https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service?tabs=csom
- ⁶ https://blog.lsonline.fr/2019/10/04/microsoft-graph-api-or-sharepoint-rest-api/
- ⁷ https://devblogs.microsoft.com/microsoft365dev/microsoft-365-patterns-and-practices-pnp-november-2020-update/
- ⁸ https://github.com/pnp/pnpcore
- ⁹ https://learn.microsoft.com/en-us/sharepoint/dev/general-development/choose-the-right-api-set-in-sharepoint
- https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/using-csom-for-dotnet-standard
No comments:
Post a Comment