Package SharePoint.Client.Runtime 15.0.0 is not compatible with netcoreapp3.1

Elba 141 Reputation points
2021-02-27T15:55:42.687+00:00

I am trying to use C# in Visual Studio to write to a SharePoint List . So I tried to install the Nuget Package called SharePoint.Client.Runtime

I am getting the error message below.

    Severity    Code    Description Project File    Line    Suppression State
    Error   NU1202  Package SharePoint.Client.Runtime 15.0.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package SharePoint.Client.Runtime 15.0.0 supports: microsoftsharepointclientruntime (Microsoft.SharePoint.Client.Runtime,Version=v0.0)    trySharePoint   B:\project\C-Sharp-4\SharePoint\trySharePoint\trySharePoint\trySharePoint.csproj    1   

Any thoughts on how to resolve this error or any alternatives?

Microsoft 365 and Office | SharePoint Server | Development
Developer technologies | .NET | Other
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

1 answer

Sort by: Most helpful
  1. ZhengyuGuo 10,591 Reputation points Moderator
    2021-03-01T01:31:12.567+00:00

    Hi @Elba ,

    SharePoint On-Premise Server Client Object 15.x is not compatible with .NET Core solution.

    Currently only SharePoint Online CSOM support for .NET Core (SharePoint On-Premise didn't support) , please check this blog:

    72737-snipaste-2021-03-01-09-27-40.png

    For detailed information, please refer this blog:

    .NET Standard version of SharePoint Online CSOM APIs

    If you are using SharePoint Online, then install the CSOM from Nuget like this:

    Microsoft.SharePointOnline.CSOM 16.1.20211.12000

    Thanks
    Best Regards


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.