0

I want to create item into SharePoint online list through .Net core console or Web API through CSOM, so is it possible? If yes then How?

Thanks in advance!

1

As of now, it's not possible to run a code with SharePoint CSOM under target framework equals to netcoreapp. However, you can create a .net core project (web app for example) and change TargetFramework to net471. All Microsoft related packages depend on .net standard, .net framework 4.7.* also depends on .net standard, that's why you can restore all dependencies successfully. The only obvious drawback is that you lose cross-platform feature and can't run your solution on linux. Yet you can use latest asp.net core version.

Recently I've created a sample SharePoint add-in solution, based on ASP.NET Core 2.1, it's available here - ASP.NET-Core-with-SharePoint-Add-in . Please read this my answer if you want to understand how to run this sample.

0

For .NET Core project, SharePoint CSOM still not supported to build with it.

Support .NET Core with CSOM is Currently in Implementation. You can check the status of the User Voice using the Below link

https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform/suggestions/16585795-support-net-core-with-csom

Here is a nice workaround which will getting SharePoint CSOM run with .NET Core, I would suggest you can refer:

http://rajujoseph.com/getting-net-core-and-sharepoint-csom-play-nice/

But it's not the official support way to run .NET Core Project with SharePoint CSOM

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.